Bug #348
closed
Preserve initialization with zero in LLVM
Added by Evgeny Novikov over 14 years ago.
Updated about 12 years ago.
Detected in build:
old bug
Published in build:
e2a8d1f
Description
Vadim 2009-12-24 13:16:58 MSK
There is curently a bug in BLAST: it does not initialize global variables without explicit initializer in the code.
For instance if we have global var int ldv_mutex; BLAST will not initialize it with zero.
As workaround we write
int ldv_mutex=0;
If global var is initialized to zero LLVM removes explicit initialization in the code generated by CBackend. Because of BLAST bug it is highly recommended to do explicit initialization for global vars as in the original code.
Workaround used for LLVM up to date is initialize variables with something more then 1.
- Priority changed from Low to High
After beginning of ldv gcc pp usage we will be able to use standard boolean values for our model variables. Don't forget to do this!
- Priority changed from High to Normal
This issue is broader than LLVM, and new pretty printer, anyway.
To fully support initialization with zeros, we should also fix bug #331. We either should fix them both or not bother.
- Status changed from Open to Resolved
- Published in build set to e2a8d1f
There is no more the given issue since we have moved aspectator from LLVM to GCC.
I'm not quite sure about closing it. What's the current status of the problem? Does Aspectator preserve zero-initializers?
- Status changed from Resolved to Closed
I see here (referenced task for 43_1a aspect model) that C backend does preserve zero-initializers (ldv_spin is initialized with 0). So, close the issue.
- Project changed from Linux Driver Verification to C Instrumentation Framework
- Category deleted (
15)
Also available in: Atom
PDF