Bug 1371894
Summary: | [cbmc] tests fail on big endian arches | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Dan Horák <dan> |
Component: | cbmc | Assignee: | Jerry James <loganjerry> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | loganjerry, shakthimaan, than |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | cbmc-5.5-2.fc25 cbmc-5.5-2.fc24 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-09-22 07:33:40 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 467765, 1071880 |
Description
Dan Horák
2016-08-31 11:46:24 UTC
I don't have access to any big endian machines. I've had guest accounts on various people's machines in the past. I ran through all of them this morning, and all of the machines are either inaccessible or don't recognize my former username + password. If somebody can provide me with an account on some big endian hardware somewhere, I am quite happy to debug this issue. Anybody? Anbody? Bueller? Just eyeballing the two failing tests, my guess is that the Pointer_array5 failure might go away if -fno-strict-aliasing is used. The Pointer_byte_extract5 failure is more puzzling. The first failing assertion happens like this: p->List[1].b = 999; __CPROVER_assert(p->List[1].b==999, "p->List[1].b==999"); We set that value to 999, then assert that the value is 999, and it isn't. But the array index is higher than the array size declared by the packed type. So I'm going to go out on a limb and conjecture that using a flexible array in the type declaration will fix this one; i.e., patching the code so the #ifdef __GNUC__ case reads: typedef struct { int Count; Union List[]; } __attribute__((packed)) Struct3; If nobody is able to give me an account somewhere, could one of you with access to hardware please add this to %prep and try building again? # Fix a test with type aliasing sed -i '/main\.c/a-fno-strict-aliasing' regression/cbmc/Pointer_array5/test.desc # Fix a test with out-of-bounds access to a packed array sed -i '/__GNUC__/,/else/s/List\[1\]/List[]/' regression/cbmc/Pointer_byte_extract5/main.c (In reply to Jerry James from comment #1) > I don't have access to any big endian machines. I've had guest accounts on > various people's machines in the past. I ran through all of them this > morning, and all of the machines are either inaccessible or don't recognize > my former username + password. If somebody can provide me with an account > on some big endian hardware somewhere, I am quite happy to debug this issue. > Anybody? Anbody? Bueller? > please take a look at following link to get access to th s390x machine http://www-03.ibm.com/systems/z/os/linux/support/community.html > Just eyeballing the two failing tests, my guess is that the Pointer_array5 > failure might go away if -fno-strict-aliasing is used. The > Pointer_byte_extract5 failure is more puzzling. The first failing assertion > happens like this: > > p->List[1].b = 999; > > __CPROVER_assert(p->List[1].b==999, "p->List[1].b==999"); > > We set that value to 999, then assert that the value is 999, and it isn't. > But the array index is higher than the array size declared by the packed > type. So I'm going to go out on a limb and conjecture that using a flexible > array in the type declaration will fix this one; i.e., patching the code so > the #ifdef __GNUC__ case reads: > > typedef struct > { > int Count; > Union List[]; > } __attribute__((packed)) Struct3; > > If nobody is able to give me an account somewhere, could one of you with > access to hardware please add this to %prep and try building again? > > # Fix a test with type aliasing > sed -i '/main\.c/a-fno-strict-aliasing' > regression/cbmc/Pointer_array5/test.desc > cbmc doesn't support this flag and failed with: * * CBMC 5.5 - Copyright (C) 2001-2016 (64-bit version) * * * * Daniel Kroening, Edmund Clarke * * * * Carnegie Mellon University, Computer Science Department * * * * kroening * * * * Protected in part by U.S. patent 7,225,417 * * Usage: Purpose: cbmc [-?] [-h] [--help] show help cbmc file.c ... source file names .. > # Fix a test with out-of-bounds access to a packed array > sed -i '/__GNUC__/,/else/s/List\[1\]/List[]/' > regression/cbmc/Pointer_byte_extract5/main.c comfirmed that it fixes the issue trace for the failed properties CBMC version 5.5 64-bit s390x linux Parsing regression/cbmc/Pointer_array5/main.c file <Kommandozeile> line 0: <Kommandozeile>:0:0: Warnung: »__STDC_VERSION__« redefiniert file <eingebaut> line 0: <eingebaut>:0:0: Anmerkung: dies ist die Stelle der vorherigen Definition Converting Type-checking main Generating GOTO Program Adding CPROVER library (s390x) file <Kommandozeile> line 0: <Kommandozeile>:0:0: Warnung: »__STDC_VERSION__« redefiniert file <eingebaut> line 0: <eingebaut>:0:0: Anmerkung: dies ist die Stelle der vorherigen Definition Removal of function pointers and virtual functions Partial Inlining Generic Property Instrumentation Starting Bounded Model Checking size of program expression: 95 steps simple slicing removed 24 assignments Generated 1 VCC(s), 1 remaining after simplification Passing problem to propositional reduction converting SSA Running propositional reduction Post-processing Solving with MiniSAT 2.2.1 with simplifier 12568 variables, 25409 clauses SAT checker: instance is SATISFIABLE Runtime decision procedure: 0.038s ** Results: [main.assertion.1] assertion address==&a0: FAILURE Trace for main.assertion.1: State 18 file regression/cbmc/Pointer_array5/main.c line 8 function main thread 0 ---------------------------------------------------- arraylen=0 (00000000000000000000000000000000) State 19 file regression/cbmc/Pointer_array5/main.c line 8 function main thread 0 ---------------------------------------------------- arraylen=3 (00000000000000000000000000000011) State 21 file regression/cbmc/Pointer_array5/main.c line 12 function main thread 0 ---------------------------------------------------- array_init=((signed int **)NULL) (0000000000000000000000000000000000000000000000000000000000000000) State 41 file regression/cbmc/Pointer_array5/main.c line 12 function main thread 0 ---------------------------------------------------- array_init=dynamic_object1 (0000001000000000000000000000000000000000000000000000000000000000) State 42 file regression/cbmc/Pointer_array5/main.c line 14 function main thread 0 ---------------------------------------------------- a0=0 (00000000000000000000000000000000) State 43 file regression/cbmc/Pointer_array5/main.c line 14 function main thread 0 ---------------------------------------------------- a1=0 (00000000000000000000000000000000) State 44 file regression/cbmc/Pointer_array5/main.c line 14 function main thread 0 ---------------------------------------------------- a2=0 (00000000000000000000000000000000) State 45 file regression/cbmc/Pointer_array5/main.c line 16 function main thread 0 ---------------------------------------------------- dynamic_object1[0l]=&a0!0@1 (0000001100000000000000000000000000000000000000000000000000000000) State 46 file regression/cbmc/Pointer_array5/main.c line 17 function main thread 0 ---------------------------------------------------- dynamic_object1[1l]=&a1!0@1 (0000010000000000000000000000000000000000000000000000000000000000) State 47 file regression/cbmc/Pointer_array5/main.c line 18 function main thread 0 ---------------------------------------------------- dynamic_object1[2l]=&a2!0@1 (0000010100000000000000000000000000000000000000000000000000000000) State 48 file regression/cbmc/Pointer_array5/main.c line 20 function main thread 0 ---------------------------------------------------- local_array=((const void **)NULL) (0000000000000000000000000000000000000000000000000000000000000000) State 49 file regression/cbmc/Pointer_array5/main.c line 20 function main thread 0 ---------------------------------------------------- local_array=dynamic_object1 (0000001000000000000000000000000000000000000000000000000000000000) State 50 file regression/cbmc/Pointer_array5/main.c line 22 function main thread 0 ---------------------------------------------------- address=((signed int *)NULL) (0000000000000000000000000000000000000000000000000000000000000000) State 51 file regression/cbmc/Pointer_array5/main.c line 22 function main thread 0 ---------------------------------------------------- address=((signed int *)NULL) + 192 (0000000000000000000000000000000000000000000000000000000011000000) Violated property: file regression/cbmc/Pointer_array5/main.c line 23 function main assertion address==&a0 address == &a0 ** 1 of 1 failed (1 iteration) VERIFICATION FAILED cbmc-5.5-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-886bd77454 cbmc-5.5-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-886bd77454 cbmc-5.5-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-d045b1594c cbmc-5.5-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-d045b1594c cbmc-5.5-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-d045b1594c cbmc-5.5-2.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-886bd77454 cbmc-5.5-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report. cbmc-5.5-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report. |