Project

General

Profile

Actions

Bug #348

closed

Preserve initialization with zero in LLVM

Added by Evgeny Novikov almost 14 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Start date:
08/05/2010
Due date:
% Done:

0%

Estimated time:
Detected in build:
old bug
Platform:
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.


Related issues 1 (0 open1 closed)

Blocks C Instrumentation Framework - Bug #876: Issues related with LLVM usage should be removedClosedEvgeny Novikov02/21/2011

Actions
Actions #1

Updated by Evgeny Novikov almost 14 years ago

Workaround used for LLVM up to date is initialize variables with something more then 1.

Actions #2

Updated by Evgeny Novikov over 13 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!

Actions #3

Updated by Pavel Shved over 13 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.

Actions #4

Updated by Evgeny Novikov almost 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.

Actions #5

Updated by Pavel Shved almost 13 years ago

I'm not quite sure about closing it. What's the current status of the problem? Does Aspectator preserve zero-initializers?

Actions #6

Updated by Evgeny Novikov almost 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.

Actions #7

Updated by Evgeny Novikov over 11 years ago

  • Project changed from Linux Driver Verification to C Instrumentation Framework
  • Category deleted (15)
Actions

Also available in: Atom PDF