-
-
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
alloca & callconv fixes #11644
alloca & callconv fixes #11644
Conversation
This is fantastic. Great work, Jameson! |
9aa838f
to
3add3c5
Compare
the win32 test was broken because llvm33 incorrectly orders a |
fix #11187 (pass struct and tuple objects by stack pointer) fix #11450 (ccall emission was frobbing the stack) likely may fix #11026 and may fix #11003 (ref #10525) invalid stack-read on 32-bit this additionally changes the julia specSig calling convention to pass non-primitive types by pointer instead of by-value this additionally fixes a bug in gen_cfunction that could be exposed by turning off specSig this additionally moves the alloca calls in ccall (and other places) to the entry BasicBlock in the function, ensuring that llvm detects them as static allocations and moves them into the function prologue this additionally fixes some undefined behavior from changing a variable's size through a alloca-cast instead of zext/sext/trunc this additionally prepares for turning back on allocating tuples as vectors, since the gc now guarantees 16-byte alignment future work this makes possible: - create a function to replace the jlallocobj_func+init_bits_value call pair (to reduce codegen pressure) - allow moving pointers sometimes rather than always copying immutable data - teach the GC how it can re-use an existing pointer as a box
…a (16 byte) and C (assume 1 byte) as needed
3add3c5
to
754bad4
Compare
CI seems (mostly) happy now, so I'll merge this in the morning. then we can start to check whether it has successfully taken care of all of the invalid stack reads or if any still remain. |
Looks like the ccall test failed on 32-bit travis? |
fooey, i think i merged the wrong version of this branch |
@Keno and @JeffBezanson for your awareness, see the commit description for all of the things that this modifies
(i couldn't get the Vector case working -- it corrupts the
functional
test if you are interested in trying to find the alignment bug yourself -- so i turned it back off)