You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I could reproduce the crash on both Linux and Windows, using various libxml versions. On Windows I got crashes even when I changed the parallelism to 1 (the crash location was then in Go runtime semaphore code); on Linux I couldn't reproduce this with less than 4 goroutines.
The crash does not happen when the SetResolver line is commented out in the source.
The crash usually happens at the above-mentioned location (go_can_resolve_function), when it's trying to dereference the address of the IsFunctionRegistered VariableScope interface method, but the interface pointer is corrupt. In one debugging session, it contained an 8-byte character string that was the result of the XPath expression.
The text was updated successfully, but these errors were encountered:
Thanks for the pointer, and actually #79 by @grahamking already contains a fix by @kisielk almost identical to mine (didn't know to check it because the title of the PR is "Fixes for Go 1.4" - I pretty much started with Go 1.5, so didn't think it was relevant). I'm keeping this PR open for now - seems #79 is somewhat controversial (according to @twojtasz comment) but I don't think this one is.
There seems to be some memory corruption happening when using custom XPath resolver using XPath.SetResolver(VariableScope):
I've reduced the repro to the minimal source I could, see crashtest.go and the full crash log for Linux with 4 goroutines at https://gist.github.com/magnushiie/4587ba63b3a37bc9e76e
I could reproduce the crash on both Linux and Windows, using various libxml versions. On Windows I got crashes even when I changed the parallelism to 1 (the crash location was then in Go runtime semaphore code); on Linux I couldn't reproduce this with less than 4 goroutines.
The crash does not happen when the SetResolver line is commented out in the source.
The crash usually happens at the above-mentioned location (go_can_resolve_function), when it's trying to dereference the address of the IsFunctionRegistered VariableScope interface method, but the interface pointer is corrupt. In one debugging session, it contained an 8-byte character string that was the result of the XPath expression.
The text was updated successfully, but these errors were encountered: