Skip to content
Snippets Groups Projects
Commit 3d6ee15c authored by Jiří Kalvoda's avatar Jiří Kalvoda
Browse files

Merge branch 'master' of gitlab.kam.mff.cuni.cz:jirikalvoda/binary-paint-shop-problem

parents 93e76a19 5a978577
Branches
No related tags found
No related merge requests found
Before lock
After lock
CN: 99232 3
After unlock
BREAK 99232 3
End T
Before lock
After lock
CN: 99233 3
After unlock
BREAK 99233 3
End T
Before lock
After lock
CN: 99234 3
After unlock
BREAK 99234 3
End T
Before lock
After lock
CN: 99235 3
After unlock
BREAK 99235 3
End T
Before lock
After lock
CN: 99236 3
After unlock
BREAK 99236 3
End T
Before lock
After lock
CN: 99237 3
After unlock
BREAK 99237 3
End T
Before lock
After lock
CN: 99238 3
After unlock
BREAK 99238 3
End T
Before lock
After lock
CN: 99239 3
After unlock
BREAK 99239 3
End T
Hello!
I compiled sdpa-c with gcc version 8.3.0 (Debian 8.3.0-6)
from source code taken from
https://sourceforge.net/projects/sdpa/files/sdpa-c/sdpa-c.7.3.8.src.20180125.tar.gz
and then ran libexample/example1.exe it fail on Segmentation fail in
`Newton::compute_bMatgVec_dense_threads_SDP` function.
After some debugging I noticed that variable `Column_Number` overflows and
becomes negative, which easily crashes the program. But why it overflows? This
should not happen because its thread should immediately exit once it is bigger
than `SDP_nConstraintl`, which is actually very small. I start debugging
program using debugging prints [sdpa_newton_debug.cpp] and it look that
something here is really wrong. After last command in the thread function
program return to `for (int k1)` loop, increment Column_Number, break and
repeat this part one again (part of output in [log]). But why? There is no
`goto` statement, thread should immediate exit. Actually gcc add this goto by
itself. The function should return `void*`, so exiting the function without any
return id undefined behavior. So gcc could do anything during the optimization.
Explicitly in this case it start repeat the loop. Notice, that if optimization
of turned off, everything work well.
How to solve that?
In is easy, just add `return NULL` on the end of this function.
In this file is more such functions, so please do it for each of them
as is done in [sdpa_newton_fix.cpp].
Thanks
Jiri Kalvoda
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment