-
Notifications
You must be signed in to change notification settings - Fork 0
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
Sanitizer build #33
Sanitizer build #33
Conversation
Use multiline commands to separate the different build steps and remove redundant directory specifiers.
There seems to be undefined references to sanitizer functions. I will try to figure out why this happens. |
…odules Drop the flag forwarding for dynamic libraries since these will be resolved when linking the final executable.
…ries when enabling sanitizers
The build is now fixed. The sanitizers have detected a memory leak in the simulator. State *init_state() {
auto state = new State();
auto zeroSlot = Slot(Time());
state->queue.push(zeroSlot);
return state;
} in |
After some more investigation, it turns out the memory is lost in the call to int Engine::simulate(int n) {
assert(engine && "engine not found");
assert(state && "state not found");
SmallVector<void *, 1> arg({&state});
// initialize simulation state
auto invocationResult = engine->invoke("llhd_init", arg);
if (invocationResult) {
llvm::errs() << "Failed invocation of llhd_init: " << invocationResult;
return -1;
}
// ...
} |
Thanks a lot for the PR and looking into it, that's awesome! |
Yes, I think it would be a good solution. Right now the leaks are small but I would expect real-world examples to have way more allocations, so taking care of it would not hurt. If you want to stay C-friendly you could also have a |
* note: any signal with index higher than `nSigs` is a subsignal and points inside a region of another pointer
It works now! |
True. Nice to see that this was the only detected issue! |
Otherwise there's just a missing newline in the new cmake module, I'm not sure how important that is though |
Fixed it. |
Allright, thanks a lot :) |
Add support for sanitizer builds and update the CI configuration accordingly. Simplify the CI configuration slightly by centralizing configuration options in the top-level environment and by using multi-line
run
commands.