Project

General

Profile

Actions

Bug #3131

closed

Wrong handling of function-like non-argument macros

Added by Denis Efremov almost 12 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Urgent
Category:
-
Start date:
06/27/2012
Due date:
% Done:

0%

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

Description

Aspectator doesn't support function-like macros without arguments as join points (or [primitive] pointcuts). But sometimes this feature is needed. For example, if we want to create kernel configuration invariant rule, we should create two types of aspects( on function and on macros ) in the following case:

include/linux/cpu.h-165:#ifdef CONFIG_HOTPLUG_CPU
include/linux/cpu.h:168:extern void get_online_cpus(void);
include/linux/cpu.h-169:extern void put_online_cpus(void);
include/linux/cpu.h-188:#else /* CONFIG_HOTPLUG_CPU */
include/linux/cpu.h:190:#define get_online_cpus() do { } while (0)
include/linux/cpu.h-191:#define put_online_cpus() do { } while (0)

Aspect (model0115_1a-blast.aspect):

8:after: call( void get_online_cpus(..) )
503:around: define( get_online_cpus() )

Error:

model0115_1a-blast.aspect:503.33-503.33: aspect file processed has incorrect syntax
cc1: fatal error: terminate work after syntax error happened
compilation terminated.
Aspectator fails on the 1st stage


Related issues 4 (3 open1 closed)

Related to C Instrumentation Framework - Bug #3208: Macros with a variable number of arguments supportClosedEvgeny Novikov07/13/2012

Actions
Blocks Linux Kernel Safety RuleDB - Feature #3223: 117: local_irq_save/local_irq_restore && local_irq_enable/local_irq_disable pairs one another nesting checkNewDenis Efremov07/18/2012

Actions
Blocks Linux Kernel Safety RuleDB - Feature #3032: 115: Do not use might_sleep functions in interrupt contextOpen06/14/2012

Actions
Blocks Linux Kernel Safety RuleDB - Feature #3225: 122: might_sleep functions should not be invoked with disabled interruptsOpen07/18/2012

Actions
Actions

Also available in: Atom PDF