-
Notifications
You must be signed in to change notification settings - Fork 206
Restrict running Valgrind #282
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
Conversation
@sjaeckel I added a --with-travis-valgrind option which has the travis specific behavior. Please do us a favor and merge this, update all PRs on top of develop and be done with all of it in two minutes ;) |
Ah, I see you already approved. But I think you might like --with-travis-valgrind better. |
indeed I do
that's why I already killed all other PR's running besides that run that is nearly finished ;-) |
9d6e37e
to
0c5a056
Compare
@sjaeckel For some reason it is still running valgrind. Travis says "branch develop" but this is a PR. Let me check. |
Urks. TRAVIS_BRANCH: for builds triggered by a pull request this is the name of the branch targeted by the pull request. Fix incoming... |
ac030a8
to
4067696
Compare
@sjaeckel Works now. We will see if it still valgrinds on develop after you merged it ;) |
We could probably add a single valgrind build as one of the first so we're sure that at least the default config is valgrinded before merging a PR!? |
I also thought about it and I think it is unnecessary. But if you want it no problem, only one is much more acceptable imho. |
I think it won't be needed very often, but I'd prefer to have for those few cases
I also think so! that's how we do it for libtomcrypt as well, only the default build gets valgrinded |
Ah I rejected the idea since we would need valgrind on MP_8BIT MP_16BIT etc to be safe. And then it is again open ended. |
the most restrictive build is with CONV_WARNINGS=strict but this one also enables enum which is not yet the default ABI |
I don't think that's required!
|
* Activate on the develop branch * Activate on branches containing the word v-algrind (without hyphen) * Activate if the commit message contains v-algrind (without hyphen) * Run default build always with valgrind
5d9ded8
to
01e93bb
Compare
@sjaeckel Could we run the tuner only for 64 bit and not for all the cases? It also needs quite some time. We should run it at least once to make sure that nothing breaks by accident. Otherwise the tuner is probably low churn and we don't have to test in in all configs. The timer is also a library consumer and probably not affected by MP_8BIT etc. Well, the result is - but not the procedure by itself. |
perfectly fine by me! |
btw. I've just discovered https://travis-ci.org/libtom/libtommath/jobs/535171987 by hazard... should we have error'ed on this? I can't reproduce it |
You mean the malloc reachable memory? At first this is not really a bug since it is still reachable and it happens in the dynamic loader. I've seen such things quite often, ld.so and dlopen often leaks memory in some way but this has nothing to do with us. EDIT: Ok has nothing todo with the dynamic loader, but with libstdc++. I don't understand where c++ is coming from here. EDIT2: We should probably compile with debug data enable. Are we doing this already? Then valgrind might give us more infos if the call is coming from us. Enabling -g has no downsides, it just adds dwarf. |
... as they take the longest time
good idea for the valgrind build! |
It needs to treated as such as long as it is in LTM. And the 16-bit version is quite usable with a lot of 16-bit MCUs, says Mouser. The 8-bit MCUs on the other side have rarely enough memory available for even the most reduced version of LTM. Only some of the 8-bit "classicals" come close.
There is no different code for There is no different code for There is different code for And honestly: such large test-suites are not really useful for the average commit. One compiler with all hardening options switched on, (with and) without memory tests for 8(, 16, 32,) and 64 bit (and Maybe another option like the one switching memory-tests on/off to switch the whole test for that environment on/off? |
I think what we have here is a good compromise. Average PRs are valgrinded only once and develop is fully valgrinded. I like it like this! |
I like it as well and now that this single valgrind build takes longer than all the other builds together we can also leave all the others enabled :D |
Except for the tuner. It is too slow, @czurnieden! :D |
I can live with the speed of the tuner :-) as long as it's faster than the valgrind build it's fine ;-) |
@sjaeckel COMPILE_DEBUG needlessly disables optimizations. This was written in former times when -O2/O3 was not compatible with -g. I have to change this. The valgrind build takes 30 minutes now 😠 |
If you additionally want to disable optimizations, define this IGNORE_SPEED macro.
@sjaeckel Now it works, but the sanitized clang build is probably not the best idea for valgrind - instead I activate valgrind on the gcc 4.9 build without sanitizer and run it first. Do you agree? The sanitized clang build takes around 25 minutes, the gcc 4.9 build 17 minutes. If we want to optimize more we could also disable installing valgrind everytime etc. But this is probably not worth it. We got the long hanging fruits now. |
[skip ci]
🍌 |
Now I am done. I won't touch this anymore. I promise. |
so all long-running jobs start in the beginning [skip ci]
With the new #265
Better? ;-) |
With valgrind the tests take about 15 minutes, without valgrind about 1 minute. We should not do that. I think it is bad for us and it is kind of abusive towards travis.