Topics

Two Mamda libraries exporting the same symbol

Slade, Michael J
 

Hi all,

 

We have noticed that both mamda/c_cpp/src/cpp/MamdaQuoteListener.cpp and mamda/c_cpp/src/orderbooks/MamdaQuoteToBookListener have implementations of a QuoteCache struct in the Wombat namespace. Therefore, both libmamda and libmamdabook are exporting the same symbol.

 

This is an issue when linking against the two libraries since the order they are dynamically linked determines which one is used. If the wrong QuoteCache struct is used this causes a segfault during construction of the object as the two implementations are different.

 

To me this seems like a bug and one of the two QuoteCache structs should be renamed.

 

Has anyone had an issue with this before / can anyone shed some light on this?

 

Thanks,

 


Mike Slade | Corporate & Investment Bank | Market Data Services | J.P. Morgan

 

This message is confidential and subject to terms at: https://www.jpmorgan.com/emaildisclaimer including on confidentiality, legal privilege, viruses and monitoring of electronic messages. If you are not the intended recipient, please delete this message and notify the sender immediately. Any unauthorized use is strictly prohibited.

Frank Quinn
 

Hi Mike,

 

This isn’t something that I have seen before but it does look like a bug to me… and one which I imagine you had all sorts of fun tracking down.

 

On the upside, it looks like the struct in question isn’t referenced in the public headers so at least it can be renamed in relative isolation. Is this something that you are in the progress of doing or you want me to have a look?

 

I have raised https://github.com/OpenMAMA/OpenMAMA/issues/392 for tracking.

 

Cheers,

Frank

 

From: Openmama-dev@... <Openmama-dev@...> On Behalf Of Slade, Michael J via Lists.Openmama.Org
Sent: 26 April 2019 09:23
To: Openmama-dev@...
Cc: Openmama-dev@...
Subject: [Openmama-dev] Two Mamda libraries exporting the same symbol

 

Hi all,

 

We have noticed that both mamda/c_cpp/src/cpp/MamdaQuoteListener.cpp and mamda/c_cpp/src/orderbooks/MamdaQuoteToBookListener have implementations of a QuoteCache struct in the Wombat namespace. Therefore, both libmamda and libmamdabook are exporting the same symbol.

 

This is an issue when linking against the two libraries since the order they are dynamically linked determines which one is used. If the wrong QuoteCache struct is used this causes a segfault during construction of the object as the two implementations are different.

 

To me this seems like a bug and one of the two QuoteCache structs should be renamed.

 

Has anyone had an issue with this before / can anyone shed some light on this?

 

Thanks,

 


Mike Slade | Corporate & Investment Bank | Market Data Services | J.P. Morgan

 

This message is confidential and subject to terms at: https://www.jpmorgan.com/emaildisclaimer including on confidentiality, legal privilege, viruses and monitoring of electronic messages. If you are not the intended recipient, please delete this message and notify the sender immediately. Any unauthorized use is strictly prohibited.

Slade, Michael J
 

Hi Frank,

 

Thanks for your message, and for raising the associated issue in Github.

 

We have discovered that the MamdaQuoteToBookListener.cpp file is not present in the SConscript.win build configuration file – it is only included in the Linux build. For now we are working around this issue by excluding the file from the non-windows SConscript file too.

 

If you could have a look at this issue, that would be great.

 

Many thanks,

 


Mike Slade | Corporate & Investment Bank | Market Data Services | J.P. Morgan

 

From: Frank Quinn [mailto:fquinn@...]
Sent: 30 April 2019 14:04
To: Slade, Michael J <michael.j.slade@...>; openmama-dev@...
Subject: RE: Two Mamda libraries exporting the same symbol

 

Hi Mike,

 

This isn’t something that I have seen before but it does look like a bug to me… and one which I imagine you had all sorts of fun tracking down.

 

On the upside, it looks like the struct in question isn’t referenced in the public headers so at least it can be renamed in relative isolation. Is this something that you are in the progress of doing or you want me to have a look?

 

I have raised https://github.com/OpenMAMA/OpenMAMA/issues/392 for tracking.

 

Cheers,

Frank

 

From: Openmama-dev@... <Openmama-dev@...> On Behalf Of Slade, Michael J via Lists.Openmama.Org
Sent: 26 April 2019 09:23
To: Openmama-dev@...
Cc: Openmama-dev@...
Subject: [Openmama-dev] Two Mamda libraries exporting the same symbol

 

Hi all,

 

We have noticed that both mamda/c_cpp/src/cpp/MamdaQuoteListener.cpp and mamda/c_cpp/src/orderbooks/MamdaQuoteToBookListener have implementations of a QuoteCache struct in the Wombat namespace. Therefore, both libmamda and libmamdabook are exporting the same symbol.

 

This is an issue when linking against the two libraries since the order they are dynamically linked determines which one is used. If the wrong QuoteCache struct is used this causes a segfault during construction of the object as the two implementations are different.

 

To me this seems like a bug and one of the two QuoteCache structs should be renamed.

 

Has anyone had an issue with this before / can anyone shed some light on this?

 

Thanks,

 


Mike Slade | Corporate & Investment Bank | Market Data Services | J.P. Morgan

 

This message is confidential and subject to terms at: https://www.jpmorgan.com/emaildisclaimer including on confidentiality, legal privilege, viruses and monitoring of electronic messages. If you are not the intended recipient, please delete this message and notify the sender immediately. Any unauthorized use is strictly prohibited.

This message is confidential and subject to terms at: https://www.jpmorgan.com/emaildisclaimer including on confidentiality, legal privilege, viruses and monitoring of electronic messages. If you are not the intended recipient, please delete this message and notify the sender immediately. Any unauthorized use is strictly prohibited.