Small help on trivial issue
Vijay Khemka
vijaykhemka at fb.com
Fri Aug 2 06:09:07 AEST 2019
Team,
I am having small issue of global json object corruption and I am unable to find reason for it. I am defining a global json object (nlohmann::json appSelData) at the start of file. I am initializing this object in register function and accessing this in different functions defined in same shared library. While accessing in different function, it doesn’t hold initialized data. This is failing in my storagecommands.cpp for IPMI.
Then I created a separate new file selcommands.cpp and did the same operation, it works here as expected. So I am wondering why it is failing in existing file vs new one. Looks like there are some header included in existing file is messing it up but I have no clue yet. This only happens with json object.
For your reference, I am attaching both below files
Storagecommands.cpp – where this fails
Selcommands.cpp – where it works.
I know it is a debug issue and I have been struggling last 2 days so thought of asking for help to team. Any help here would be appreciated.
Regards
-Vijay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20190801/5520c5b4/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: selcommands.cpp
Type: application/octet-stream
Size: 5853 bytes
Desc: selcommands.cpp
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20190801/5520c5b4/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: storagecommands.cpp
Type: application/octet-stream
Size: 28971 bytes
Desc: storagecommands.cpp
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20190801/5520c5b4/attachment-0003.obj>
More information about the openbmc
mailing list