-
-
Notifications
You must be signed in to change notification settings - Fork 5.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
strings tests segfaulting on arm #12347
Comments
The |
This is the stacktrace.
|
Culprit seems to be the
Will be trying on 0.5, but seeing how this is a RPi2 it might take a while to compile :-) |
Fails on 0.5 too. Just tried it on scaleway. |
The crash is in here:
|
Some investigation:
So the
Seems like the stack pointer is corrupt: it should start at
|
A shorter repro: // gcc -ggdb -fPIC -shared test.c -o test.so -Wall
#include <stdio.h>
#include <stdint.h>
void foo(int magic)
{
printf("magic: %d\n", magic);
}
// from julia.h
typedef struct {
uint8_t isnull;
double value;
} jl_nullable_float64_t;
jl_nullable_float64_t bar(int magic)
{
printf("magic: %d\n", magic);
jl_nullable_float64_t ret = {(uint8_t)0, 0.0};
return ret;
} Call this library using: lib = Libdl.dlopen("./test.so")
ccall(Libdl.dlsym(lib, :foo), Void, (Int,), 42)
ccall(Libdl.dlsym(lib, :bar), Nullable{Float64}, (Int,), 42) This yields the following output:
So probably an issue in how |
Perhaps this what @vtjnash was referring to about implementing ARM calling conventions, and is also the warning LLVM shows. |
yes. it's best to fix compile warnings and the ccall test before trying to investigate any other segfaults. fortunately, the ARM ABI is pretty simple, so the fallback ABI is almost correct. |
Okay, had a look at it, and with this minimal ABI the |
Could this be related to #13752? |
My current ABI implementation wouldn't make any difference, I think, as non of the return types of the |
Should be fixed by #14194 now there could be other issues that make the strings test fail but that would be a different issue. |
The strings
types
andbasic
tests are segfaulting on arm.The text was updated successfully, but these errors were encountered: