-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segmentation violation/assertion violation when using stateful functors in interpreted mode #2195
Comments
Hi, |
Indeed, that did the trick! Since that is currently not mentioned in the documentation's chapter on stateful functors: shall I add a sentence or two about compiling them correctly? |
Please, could you update the documentation? Many thanks in advance. |
I believe we could have some kind of Or alternatively we could isolate the |
That would be great! |
I have added a sentence to the documentation about functors. I thought more about the script. I feel this is tricky because usually, users will have external dependencies. Therefore, I would prefer that build scripts are user-provided. |
I like the idea of separating the interface. Perhaps we can raise a new issue for this. |
Hi!
Problem: When trying to use stateful external functors with the interpreted mode, souffle crashes.
How to Reproduce:
where
test.dl
containsand
functors.cpp
containsoutput:
The outputs indicates, that the
libfunctors.so
is correctly loaded, but that is not possible to reenter the souffle code again.I instrumented souffle and die pointers to the symbol and record table are passed correctly (i.e. have the same value on the souffle side as on the library side). It makes a difference if
encode
ordecode
is used. When when enabling the call toencode
infunctor.cpp
, the output is:The error also appears with
What works is:
./build/src/souffle test.dl -g test.cpp g++ -Isrc/include test.cpp -L. -lfunctors -std=c++17 -o test LD_LIBRARY_PATH=. ./test
but for our use case (for now: executing many smallish test cases) this is unfortunately not too practical. I thought that maybe this has to do with some multithreading problems, but the error also get thrown with
-j1
.I first encountered the error on tag
2.2
(and don't no if it ever worked like that) but just reproduced it on a fresh Ubuntu VM with current master (89aae85).Am I using stateful functors wrong or is this a bug?
The text was updated successfully, but these errors were encountered: