Project

General

Profile

Actions

Bug #9710

closed

Problem with converting of type specifiers

Added by Ilya Shchepetkov almost 5 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Urgent
Category:
C back-end
Start date:
06/14/2019
Due date:
% Done:

0%

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

Description

I have two code examples, which from my point of view are identical. CIF correctly processes the first one, but fails with an error on the second one.

Example 1:

typedef int my_int1;
typedef my_int1 __attribute__((__may_alias__)) my_int2;

Example 2:

typedef int my;
typedef my __attribute__((__may_alias__)) my2;

Error:

test.c:5:1: error: LDV: ../../aspectator/gcc/c-family/ldv-convert.c: 5606: type specifier "my" wasn't converted
 typedef my __attribute__((__may_alias__)) my2;

Actions #1

Updated by Evgeny Novikov almost 5 years ago

  • Priority changed from Urgent to Normal

I do not see any urgentness in this toy example. There are much more awful known bugs. Maybe you can confirm priority of this issue as well.

Actions #2

Updated by Ilya Shchepetkov almost 5 years ago

This issue is responsible for the majority of failures on the Linux kernel (13 of 16). Truth is these failures are mostly in the areas we are not interested in, so it is not an "urgent" issue. However, it is really easy to reproduce, plus the issue looks really strange, so I propose to fix it right away.

Actions #3

Updated by Evgeny Novikov almost 5 years ago

  • Priority changed from Normal to High

C is a programming language with strange issues by design. CIF is implemented in C over C, so, it contains strange^2 issues.

Actions #4

Updated by Evgeny Novikov almost 4 years ago

The issue is due to Aspectator uses "strstr" to match type names, so, "int" matches "my_int1". This bug exists just for definition of types with attribute "may_alias" since otherwise typedef names are handled earlier.

Actions #5

Updated by Evgeny Novikov over 3 years ago

  • Category set to C back-end
  • Priority changed from High to Urgent

This issue results in 7 of 43 CIF failures during Harmony OS kernel build. Moreover, due to it there is a malformed file with typedefs that causes EMG to fail. Let's avoid infinite workarounds and fix issues properly.

Actions #6

Updated by Evgeny Novikov over 3 years ago

  • Status changed from New to Closed

I fixed the issue in a451e44. In addition, I re-implemented handling of type attributes to support (hopefully) all of them rather than a predefined set. CIF tests passed, but let's see on real applications.

Actions

Also available in: Atom PDF