Bug #7043
closed
EMG generates a parameter with incompatible type
Added by Ilja Zakharov over 8 years ago.
Updated about 5 years ago.
Category:
Environment models
Description
EMG generates a parameter of an incompatible type for a callback. This causes Weaver termination.
Drivers to reproduce:
- 'drivers/staging/iio/accel/adis16220.ko';
- 'drivers/misc/ds1682.ko'.
- Category set to Environment models
- Assignee set to Ilja Zakharov
- Priority changed from Normal to High
There are a bit more drivers to reproduce:
- 'drivers/iommu/amd_iommu_v2.ko';
- 'drivers/mtd/maps/sbc_gxx.ko'.
- Subject changed from EMG generates a paramter with incompatible type to EMG generates a parameter with incompatible type
- Priority changed from High to Normal
The problem caused by providing variables with structure type with unknown structure name as a parameter which is expected to be provided as a typedef (which is the same structure actually). Seems that EMG should resolve such structure types back to typedefs and generate variables with the typedef names before providing them as parameters.
The issue does not happen often, so decreasing the priority to normal.
Ilja Zakharov wrote:
The problem caused by providing variables with structure type with unknown structure name as a parameter which is expected to be provided as a typedef (which is the same structure actually). Seems that EMG should resolve such structure types back to typedefs and generate variables with the typedef names before providing them as parameters.
What is a problem here? Why struct name is nor suitable, while typedef to it is ok?
Cannot say exactly, Weaver (cif) fails and says that parameter has an incompatible type. At the same type expected typedef hides the same type which is used for the parameter by EMG. Maybe this is a strange behaviour of CIF or it is the case for structures without a name.
- Priority changed from Normal to High
There are 21 modules in the Linux kernel 3.14 suffered from this issue:
- drivers/staging/lustre/lustre/mdc/mdc.ko
- drivers/staging/lustre/lustre/osc/osc.ko
- drivers/md/dm-delay.ko
- drivers/md/dm-flakey.ko
- drivers/md/dm-crypt.ko
- drivers/md/dm-cache.ko
- drivers/md/dm-log-userspace.ko
- drivers/md/dm-log.ko
- drivers/md/dm-mirror.ko
- drivers/md/dm-multipath.ko
- drivers/md/dm-queue-length.ko
- drivers/md/dm-round-robin.ko
- drivers/md/dm-raid.ko
- drivers/md/dm-switch.ko
- drivers/md/dm-service-time.ko
- Priority changed from High to Normal
Actually there are just 3 drivers using
incompatible types:
- drivers/iommu/amd_iommu_v2.ko
- drivers/mtd/maps/sbc_gxx.ko
- drivers/scsi/qla2xxx/tcm_qla2xxx.ko
Those 21 drivers use incomplete types.
- Status changed from New to Resolved
See no problems with scope currently. Tested with 8066-abstract-translator.
- Status changed from Resolved to Closed
It seems that the branch was merged to master a long ago, but issues were not closed at that time.
Also available in: Atom
PDF