Node State Manager in 64bit systems ...

Hoyer, Marko (ADITG/SW2) mhoyer at
Mon Oct 17 03:49:57 EDT 2016


It seems Node State Manager will have some problems in 64 bit systems. The mechanism to wait for lifecycle_complete events uses a pointer as id to match incoming events to the lifecycle consumer data structure:

if(NSMA__pCurrentLcConsumer == (NodeStateLifeCycleConsumer*) u32RequestId)

                                                         (guint) NSMA__pCurrentLcConsumer,

This might lead to following situations:

-        A lifecycle_complete event from one of the clients is not detected due to a not matching point (the pointer is different after a cast.)

-        A lifecycle _complete event from one client is detected as the answer of another one (32bits are not compared. The id might fit for different pointers.)


-        I suggest to implement a 32 bit id generation independent from pointers. Ids can be just generated by counting up an integer during registration. I would not expect any overflow. With this solution, the interface can be kept as it is.

In addition:

-        This issue is reported by the compiler as a warning. I suggest to change the compiler settings to treat warnings as errors. This way, such kind of errors are detected very fast.

Best regards

Marko Hoyer
Advanced Driver Information Technology GmbH
Software Group II (ADITG/SW2)
Robert-Bosch-Str. 200
31139 Hildesheim
Tel. +49 5121 49 6948
Fax +49 5121 49 6999
mhoyer at
ADIT is a joint venture company of Robert Bosch GmbH/Robert Bosch Car Multimedia GmbH and DENSO Corporation
Sitz: Hildesheim, Registergericht: Amtsgericht Hildesheim HRB 3438
Geschäftsführung: Wilhelm Grabow, Ken Yaguchi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the genivi-projects mailing list