Project

General

Profile

Actions

Bug #9346

closed

Remove "-include" options after second stage

Added by Evgeny Novikov over 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Urgent
Category:
Core
Start date:
10/25/2018
Due date:
% Done:

0%

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

Description

It seems that after switching to GCC 7.3.0 we have the following issue. Options "-include" forces a preprocessor to always include corresponding headers at the beginning of source files. So they are included at the second stage first and then at all other stages as well. Sometimes when there just defines in included headers this does not hurt anybody. But, say, in Linux 4.15 there are type definitions that cause redefinition errors and failures in 100% of cases.

Header protecting macros do not help in this case as input files at third and following stages are already preprocessed. Also, option "-x cpp-output" and new option "-fpreprocessed" do not help (most likely the first one helped when Aspectator was based on GCC 4.6). Thus we need to remove all "-include" options after second stage. I hope that other preprocessor options can not break anything.


Related issues 1 (0 open1 closed)

Has duplicate C Instrumentation Framework - Bug #9372: "cif" failed: redefinition of ‘struct ftrace_branch_data’ for net/xfrm/xfrm_user.koRejected11/08/2018

Actions
Actions #1

Updated by Evgeny Novikov over 5 years ago

  • Has duplicate Bug #9372: "cif" failed: redefinition of ‘struct ftrace_branch_data’ for net/xfrm/xfrm_user.ko added
Actions #2

Updated by Evgeny Novikov over 5 years ago

  • Blocked by Feature #6780: Implement CIF in Python (script and module) added
Actions #3

Updated by Evgeny Novikov over 5 years ago

We investigated this issue more and found out that its reasons are more tricky as mentioned in description. It seems that it is caused somehow by CIF itself. Since we have had too many issues with implementation of CIF in C, the CIF test infrastructure is in Python already and there is #6780 that aims at adding a Python binding, I suggest to reimplement CIF in Python completely. This will simplify its development and support considerably while it will not hurt anybody much since most CIF users are Python applications, and thus, an interface will be even more convenient and there will be no considerable performance overhead.

Actions #4

Updated by Ilya Shchepetkov over 5 years ago

Evgeny Novikov wrote:

We investigated this issue more and found out that its reasons are more tricky as mentioned in description. It seems that it is caused somehow by CIF itself. Since we have had too many issues with implementation of CIF in C, the CIF test infrastructure is in Python already and there is #6780 that aims at adding a Python binding, I suggest to reimplement CIF in Python completely. This will simplify its development and support considerably while it will not hurt anybody much since most CIF users are Python applications, and thus, an interface will be even more convenient and there will be no considerable performance overhead.

Small nitpick: users do not launch CIF tests, so it really does not matter in what language they are written. That certainly doesn't mean that CIF should be written in Python as well.

Actions #5

Updated by Evgeny Novikov over 5 years ago

Ilya Shchepetkov wrote:

Evgeny Novikov wrote:

We investigated this issue more and found out that its reasons are more tricky as mentioned in description. It seems that it is caused somehow by CIF itself. Since we have had too many issues with implementation of CIF in C, the CIF test infrastructure is in Python already and there is #6780 that aims at adding a Python binding, I suggest to reimplement CIF in Python completely. This will simplify its development and support considerably while it will not hurt anybody much since most CIF users are Python applications, and thus, an interface will be even more convenient and there will be no considerable performance overhead.

Small nitpick: users do not launch CIF tests, so it really does not matter in what language they are written. That certainly doesn't mean that CIF should be written in Python as well.

I didn't say that users launch CIF tests. But I think that for most projects test infrastructures and likely tests themselves are developed in the same programming languages and perhaps using the same frameworks as for corresponding projects. This is not a rule, but this is an alarm. C is great for rather low-level things. For the rest there are many other great means.

Actions #6

Updated by Evgeny Novikov almost 5 years ago

  • Blocked by deleted (Feature #6780: Implement CIF in Python (script and module))
Actions #7

Updated by Evgeny Novikov almost 5 years ago

Because of getting rid of CIF wrapper is too complex task, let's fix this one separately.

Actions #8

Updated by Evgeny Novikov almost 5 years ago

  • Status changed from New to Resolved

It seems that I fixed the issue in 79a0019.

For anybody who is interested. Indeed, the issue was not due to some memory issue in the CIF wrapper, so, I had to fix it anyway. It was introduced a long ago, when CIF started to treat input files as non-preprocessed at the last stage. That was necessary to establish connections between original source files and auxiliary ones via line directives. I did not revert the latter since it is a very useful feature, but I did exactly that thing that was suggested originally in the issue title except for I changed not all stages after the second one but only the last one that suffers from this bug.

Actions #9

Updated by Evgeny Novikov almost 5 years ago

  • Status changed from Resolved to Closed

I checked that this really works.

Actions

Also available in: Atom PDF