-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[RUNTIME][PackedFunc][Registry::Manager] Segfault with Registry::Manager and PackedFunc on x86_64 GNU/Linux. #2067
Comments
This is a pretty interesting bug that I can also confirm from my side. I can confirm it on my local machine. interestingly things are fine if we use a small array. |
To investigate this a bit further, maybe we could make use of ir builder to build simple functions and run them through LLVM, to see if there is a particular thing that we did wrong. https://github.com/dmlc/tvm/blob/master/tests/python/unittest/test_codegen_vm_basic.py#L37 My guess is there is something wrong with the code we generate(which corrupts the memory) instead of the runtime part, but I am not sure what it is |
Should be resolved by #2070. This bug is caused by a compound of two problems:
|
Recently I was working on trace primitive #1973 and found the strange bug related to hashtable which store the "PACKED" functions.
1. Python example.
$cat test_packed.py
$python3 test_packed.py
Output:
my_debug
...
Segmentation fault (core dumped)
2. C++ example.
$cat test_packed.cc
$cat test_packed_runtime.cc
$ g++ -o test test_packed.cc -std=c++14
$ ./test > test.s
$g++ -o libtest.so test.s -shared
$g++ -o run_packed test_packed_runtime.cc -std=c++14
$./run_packed
Output:
my_debug
...
Segmentation fault (core dumped)
The backtrace:
The error happens even with the latest version of libstdc++ from gcc source tree.
In other case it might be that I am using the API in wrong way, it would be good if someone else confirms the same bug.
Thanks.
The text was updated successfully, but these errors were encountered: