Project

General

Profile

Actions

Bug #1159

closed

Aspectator fails with incorrect expression code

Added by Pavel Shved about 13 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
High
Category:
C back-end
Start date:
05/03/2011
Due date:
% Done:

0%

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

Description

Steps to reproduce:

LDV_DEBUG=30 ldv-manager rule_models=32_1a "envs=linux-2.6.31.6.tar.bz2" drivers=drivers/media/dvb/ttpci/dvb-ttpci.ko kernel_driver=1

see report for ldv_main4_sequence_infinite_withcheck_stateful:

work/current--X--drivers/media/dvb/ttpci/dvb-ttpci.ko--X--ri04linux-2.6.31.6--X--32_1a/linux-2.6.31.6/csd_deg_dscv/17/dscv_tempdir/dscv/ri/32_1a/drivers/media/dvb/ttpci/av7110_hw.c.p: In function 'av7110_fw_cmd':
work/current--X--drivers/media/dvb/ttpci/dvb-ttpci.ko--X--ri04linux-2.6.31.6--X--32_1a/linux-2.6.31.6/csd_deg_dscv/17/dscv_tempdir/dscv/ri/32_1a/drivers/media/dvb/ttpci/av7110_hw.c.p:517:1: fatal error: incorrect expression code
compilation terminated.
Aspectator fails on the 3d stage

Related issues 3 (2 open1 closed)

Related to C Instrumentation Framework - Feature #970: Change the way of errors handling in aspectatorOpenEvgeny Novikov03/22/2011

Actions
Related to C Instrumentation Framework - Bug #1258: C back-end processes typedefs on arrays incorrectlyClosedEvgeny Novikov05/20/2011

Actions
Related to Linux Driver Verification - Bug #1167: Bugs related with 32_1a modelOpen05/03/2011

Actions
Actions #1

Updated by Pavel Shved about 13 years ago

There are 91 drivers affected by this issue.

Two "unsafe" (maybe false, though) dvb drivers became unknown because of that.

Since this issue might actually be split among the lesser ones (I guess, there are several unimplemented expression codes of sorts), I'll leave the Normal priority, and postpone its adjustment to the further investigation.

Actions #2

Updated by Evgeny Novikov about 13 years ago

  • Status changed from New to Open

Yes, there may be several problems here. They arose due to more correct traversing through gcc trees made be the new aspectator. In fact it may be very simply to fix this bug.

Actions #3

Updated by Evgeny Novikov about 13 years ago

  • Priority changed from Normal to High

It seems me a rather simple bug that will give us a big benefit.

Actions #4

Updated by Evgeny Novikov almost 13 years ago

First of all I'm going to do some improvement to print more informative messages. In particular, this will help to investigate the given set of problems and similar ones. In fact this is the part of #970 issue.

Actions #5

Updated by Evgeny Novikov almost 13 years ago

After all I found that there are about two expressions aren't supported by aspectator
  1. va_arg_expr (drivers-media-dvb-ttpci-av7110_hw.c)
  2. truth_xor_expr (drivers-ide-ide-taskfile.c) (almost all!)
    From the moment they are treated as warnings like in C-backend and detailed information is printed:
    drivers/video/console/fonts.c.common.c: In function 'get_default_font':
    drivers/video/console/fonts.c.common.c:146:1: warning: LDV: ../../../src/branches/aspectator-core/gcc/ldv-pointcut-matcher.c: 257: tree node 'truth_xor_expr' isn't supported [enabled by default]
    

    I'm going to add their support to both aspectator and C-backend and then test problem transitions.
Actions #6

Updated by Evgeny Novikov almost 13 years ago

Commit 55e6e94 of model-43_1a branch is most likely to fix the issue. But just testing on all Linux kernel drivers will show is this true.

Actions #7

Updated by Evgeny Novikov almost 13 years ago

I found 2 more unsupported tree nodes that can be referred to as 'incorrect expression code'. They are
  1. truth_and_expr (4 drivers)
  2. truth_or_expr (1 driver)
  3. non_lvalue_expr (1 driver)
    I should fix them...
Actions #8

Updated by Evgeny Novikov almost 13 years ago

More unsupported tree nodes of this class:
  1. truth_orif_expr
  2. bind_expr
Actions #9

Updated by Evgeny Novikov almost 13 years ago

So, from 166 pairs module-main there are
  1. 111 truth_xor_expr and va_arg_expr that were fixed in 55e6e94 of model-43_1a branch.
  2. 32 truth_and_expr
  3. 14 truth_or_expr
  4. 7 non_lvalue_expr
  5. 1 truth_orif_expr
  6. 1 bind_expr
Actions #10

Updated by Evgeny Novikov almost 13 years ago

  • Priority changed from High to Normal

I believe that this issue isn't so important any more.

Actions #11

Updated by Alexey Khoroshilov almost 13 years ago

There are still several truth_and_expr, truth_orif_expr and truth_or_expr bugs.
May be they are not so often, but I would prefer to fix them in the nearest future.

Actions #12

Updated by Evgeny Novikov almost 13 years ago

Alexey Khoroshilov wrote:

There are still several truth_and_expr, truth_orif_expr and truth_or_expr bugs.
May be they are not so often, but I would prefer to fix them in the nearest future.

Here I have highlighted that just truth_xor_expr and va_arg_expr were fixed while the rest 5 kinds of expressions sometimes or always fails. But we should fix them of course :)

Actions #13

Updated by Evgeny Novikov over 11 years ago

  • Priority changed from Normal to High

We need to fix it since there is a lot of drivers that cannot be verified because of the given issue.

Actions #14

Updated by Evgeny Novikov over 11 years ago

  • Priority changed from High to Low

Commit 70075ca of the master branch has fixed processing of all expressions except one truth_orif_expr. This expression is encountered in driver drivers/media/video/saa7115.ko in function saa711x_has_reg, that has rather complex condition. It looks like there is some dependency on the number of operands in GCC. When I cut several operands from the expression it is processed well.

Actions #15

Updated by Evgeny Novikov over 11 years ago

  • Project changed from Linux Driver Verification to C Instrumentation Framework
  • Category deleted (15)
Actions #16

Updated by Evgeny Novikov over 11 years ago

  • Subject changed from GCC-aspectator fails with incorrect expression code to Aspectator fails with incorrect expression code
Actions #17

Updated by Evgeny Novikov almost 11 years ago

  • Priority changed from Low to High

At the moment truth_orif_expr is also encountered in fs/xfs/xfs.ko, for which 31 main is generated. Also that module "uses" truth_andif_expr. So I raise the issue priority.

Actions #18

Updated by Evgeny Novikov over 9 years ago

  • Priority changed from High to Normal
Actions #19

Updated by Evgeny Novikov over 8 years ago

  • Priority changed from Normal to High
Actions #20

Updated by Evgeny Novikov over 8 years ago

  • Category set to C back-end
Actions #21

Updated by Evgeny Novikov almost 5 years ago

  • Status changed from Open to Closed

I fixed most or all of mentioned issues. Please, open more specific ones if so.

Actions

Also available in: Atom PDF