Bug #348
closedPreserve initialization with zero in LLVM
0%
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.
Updated by Evgeny Novikov over 14 years ago
Workaround used for LLVM up to date is initialize variables with something more then 1.
Updated by Evgeny Novikov almost 14 years ago
- 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!
Updated by Pavel Shved almost 14 years ago
- 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.
Updated by Evgeny Novikov over 13 years ago
- 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.
Updated by Pavel Shved over 13 years ago
I'm not quite sure about closing it. What's the current status of the problem? Does Aspectator preserve zero-initializers?
Updated by Evgeny Novikov over 13 years ago
- 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.
Updated by Evgeny Novikov about 12 years ago
- Project changed from Linux Driver Verification to C Instrumentation Framework
- Category deleted (
15)