Frama-C Bug Tracking System

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001093Frama-CPlug-in > jessiepublic2012-02-13 14:052012-02-14 09:05
Reporterflecsim 
Assigned Tocmarche 
PrioritynormalSeveritycrashReproducibilityalways
StatusassignedResolutionopen 
PlatformOSOS Version
Product VersionFrama-C Nitrogen-20111001 
Target VersionFixed in Version 
Summary0001093: Passing multi-dimensional arrays via reference fails
DescriptionStarting from the simple function

#define MAX_SIZE_X 10
typedef int AnArray[MAX_SIZE_X];

void FillArray(AnArray *paTarget, int Value)
{
    int x = 0;

    for (x = 0; x < MAX_SIZE_X; x++)
    {
        (*paTarget)[x] = Value;
    }
}

the code above is accepted by Jessie and can be verified (annotations removed for brevity here), but as AnArray is extended to two or more dimensions (typedef int AnArray[MAX_SIZE_X][MAX_SIZE_Y]...) - and the filling loops adapted to match - jessie crashes on loading the source file.
Additional InformationTested with Frama-C/Nitrogen, why-2.30 and why3-0.71 compiled in cygwin.
Loading the code samples in "regular" Frama-C GUI or using WP plug-in
does not cause a crash.
I actually encountered this when analyzing the tree-dimensional case (parallelized matrix operations); this is the smallest form i found which shows the problem. More variants can be created, e.g. by moving one array dimension from the typedef into the actual argument (AnArray *paTarget[MAX_SIZE_X], int Value).
Attached file contains four C sources to demonstrate the problem (to be split at the comment boxes), accompanied by their stacktraces.
TagsNo tags attached.
Attached Filestxt file icon SamplePrograms.txt [^] (18,509 bytes) 2012-02-13 14:05 [Show Content]

- Relationships
related to 0000032assignedcmarche Internal error with assign specification on bi-dimensional arrays 

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2012-02-13 14:05 flecsim New Issue
2012-02-13 14:05 flecsim Status new => assigned
2012-02-13 14:05 flecsim Assigned To => cmarche
2012-02-13 14:05 flecsim File Added: SamplePrograms.txt
2012-02-14 09:05 virgile Relationship added related to 0000032


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker