Project

General

Profile

Actions

Bug #7043

closed

EMG generates a parameter with incompatible type

Added by Ilja Zakharov over 8 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Environment models
Target version:
-
Start date:
04/06/2016
Due date:
% Done:

0%

Estimated time:
Detected in build:
svn
Platform:
Published in build:

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'.

Related issues 2 (0 open2 closed)

Related to Klever - Bug #7245: EMG generates variables for labels with conflicting typesClosedIlja Zakharov05/24/2016

Actions
Blocked by Klever - Bug #6560: Determine incomplete types in the module scope ClosedIlja Zakharov01/28/2016

Actions
Actions #1

Updated by Ilja Zakharov over 8 years ago

  • Category set to Environment models
  • Assignee set to Ilja Zakharov
  • Priority changed from Normal to High
Actions #2

Updated by Ilja Zakharov over 8 years ago

There are a bit more drivers to reproduce:
  • 'drivers/iommu/amd_iommu_v2.ko';
  • 'drivers/mtd/maps/sbc_gxx.ko'.
Actions #3

Updated by Evgeny Novikov over 8 years ago

  • Subject changed from EMG generates a paramter with incompatible type to EMG generates a parameter with incompatible type
Actions #4

Updated by Ilja Zakharov over 8 years ago

  • 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.

Actions #5

Updated by Alexey Khoroshilov over 8 years ago

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?

Actions #6

Updated by Ilja Zakharov over 8 years ago

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.

Actions #7

Updated by Evgeny Novikov over 8 years ago

  • Priority changed from Normal to High
There are 21 modules in the Linux kernel 3.14 suffered from this issue:
  1. drivers/staging/lustre/lustre/mdc/mdc.ko
  2. drivers/staging/lustre/lustre/osc/osc.ko
  3. drivers/md/dm-delay.ko
  4. drivers/md/dm-flakey.ko
  5. drivers/md/dm-crypt.ko
  6. drivers/md/dm-cache.ko
  7. drivers/md/dm-log-userspace.ko
  8. drivers/md/dm-log.ko
  9. drivers/md/dm-mirror.ko
  10. drivers/md/dm-multipath.ko
  11. drivers/md/dm-queue-length.ko
  12. drivers/md/dm-round-robin.ko
  13. drivers/md/dm-raid.ko
  14. drivers/md/dm-switch.ko
  15. drivers/md/dm-service-time.ko
Actions #8

Updated by Evgeny Novikov over 8 years ago

  • Priority changed from High to Normal
Actually there are just 3 drivers using incompatible types:
  1. drivers/iommu/amd_iommu_v2.ko
  2. drivers/mtd/maps/sbc_gxx.ko
  3. drivers/scsi/qla2xxx/tcm_qla2xxx.ko

Those 21 drivers use incomplete types.

Actions #9

Updated by Ilja Zakharov over 6 years ago

  • Status changed from New to Resolved

See no problems with scope currently. Tested with 8066-abstract-translator.

Actions #10

Updated by Evgeny Novikov about 5 years ago

  • 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.

Actions

Also available in: Atom PDF