compile and run test programs in separate steps#10
Closed
calid wants to merge 3 commits intorun4flat:masterfrom
Closed
compile and run test programs in separate steps#10calid wants to merge 3 commits intorun4flat:masterfrom
calid wants to merge 3 commits intorun4flat:masterfrom
Conversation
avoids potential segfault when using tcc -run directly
Author
|
I forgot to mention, another reason I think it is a race condition is because I can't reproduce the segfault when running |
otherwise arg 0 won't match, e.g. 'arg 0: ./31_args.c' instead of 'arg 0: 31_args.c'
Author
|
after further thought, this doesn't really solve anything since I need to just figure out why |
Owner
|
It turns out that tcc cannot produce Mach-O executables on Mac, so the tests must run with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When both installing from cpan and when running tests out of the github repo proper I am getting segfaults. There seems to be either a race condition or other problem with
tcc -run, as it is segfaulting when trying to invoke the program main.This PR changes the test logic to split test program compilation and execution into two separate steps. This seems to avoid the problem.
My environment:
digging into the core files with gdb you can see the explosion is occuring when trying to invoke the program main.
The
?? ()indicates to me the program main is either not found or not available whentcc_runtries to invoke it. I'm not sure of the cause, but doing compilation and execution in separate steps avoids the problem.