Project

General

Profile

Actions

Bug #347

closed

Aspectator fails with extern functions calls processing

Added by Evgeny Novikov over 14 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Urgent
Category:
-
Start date:
08/05/2010
Due date:
% Done:

0%

Estimated time:
Detected in build:
old bug
Platform:
Published in build:
master

Description

I notice during 0008 model processing that aspectator doesn't deal with calls to functions declared as extern and that has no body. So there may be conflicts when due to configurations both static inline and extern module_put function will be encountered (however current toolset fails in case of such configurations).
Workaround is make definitions for extern functions. Sometimes (don't know when) all works good.


Related issues 3 (0 open3 closed)

Related to C Instrumentation Framework - Bug #362: 08_1 model status: module_put issuesClosedEvgeny Novikov08/05/2010

Actions
Has duplicate C Instrumentation Framework - Bug #367: Incorrect implemenation with void type matchingClosedEvgeny Novikov08/05/2010

Actions
Blocked by Linux Driver Verification - Bug #786: Some models contain incorrect C code!ClosedEvgeny Novikov02/03/2011

Actions
Actions #1

Updated by Evgeny Novikov almost 14 years ago

  • Priority changed from Normal to Urgent

As I have seen this is related with incorrectly obtained 'extern' storage class specifier (in fact it's in kept in gcc internal representation in the good way). I removed it but encountered the another problem in the given area: aspectator generates returns for functions returning void that leads to compilation problems:

void ldv_module_put_2 (struct module *ldv_func_arg1)
{
  typedef void ldv_func_ret_type;
  typedef struct module *ldv_func_arg_type1;

  ldv_func_ret_type ldv_func_res = module_put(ldv_func_arg1);

  ldv_module_put()

  return ldv_func_res;
}

error: variable or field ldv_func_res declared void
error: void value not ignored as it ought to be 
error: expected ; before return

(also there is some misprint in the model ldv_module_put() is called without ';').
I'm going to fix all problems and test them extensively.

Actions #2

Updated by Evgeny Novikov almost 14 years ago

The same issue is also for 37_1 model!

Actions #3

Updated by Evgeny Novikov almost 14 years ago

  • Status changed from Open to Resolved
  • Published in build set to master

Fix is in master now. See comments for related issues!

Actions #4

Updated by Evgeny Novikov almost 14 years ago

  • Status changed from Resolved to Closed

It works!

Actions #5

Updated by Evgeny Novikov about 12 years ago

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

Also available in: Atom PDF