Actions
Bug #5280
closedC backend generates artificial structure declarators (field declarators) for unnamed structures and unions
Start date:
09/19/2014
Due date:
% Done:
0%
Estimated time:
Detected in build:
old
Platform:
Published in build:
Description
The linker successfully process this issues, but it causes problems for static analysis tools with linking several files as far as the input files contain different generated field names for the same struct type name.
For CPAchecker it looks like
Error: Parsing failed (Cannot access field ldv_7819 in struct lockref in file btmrvl_debugfs_o_i in line 13373: ( * dentry ) . d_lockref . ldv_7819 (full line is return ( unsigned int ) ( * dentry ) . d_lockref . ldv_7819 . ldv_7818 . count;)) (EclipseCParser.buildCFA, SEVERE)
Example
LDV Tools f50982e, CPAchecker r13530 no_cil linux-3.17-rc1.tar.xz 32_7a drivers/bluetooth/btmrvl.ko ldv_main1_sequence_infinite_withcheck_stateful
btmrvl_main.o.i:
struct lockref { # 33 "include/linux/lockref.h" union { # 32 "include/linux/lockref.h" struct { # 30 "include/linux/lockref.h" spinlock_t lock; unsigned int count; } ldv_16557; } ldv_16558; };
btmrvl_debugfs.o.i:
struct lockref { # 33 "include/linux/lockref.h" union { # 32 "include/linux/lockref.h" struct { # 30 "include/linux/lockref.h" spinlock_t lock; unsigned int count; } ldv_7818; } ldv_7819; };
Actions