[
https://issues.apache.org/jira/browse/AMQCPP-644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16862931#comment-16862931
]
Hassan Raza commented on AMQCPP-644:
------------------------------------
I think the easiest and cleanest solution is to just not set DEBUG at all
during your release build...
The related compiler supported and standardized macros are _DEBUG and NDEBUG -
why not use them instead?
> potential issue using compression
> ---------------------------------
>
> Key: AMQCPP-644
> URL: https://issues.apache.org/jira/browse/AMQCPP-644
> Project: ActiveMQ C++ Client
> Issue Type: Bug
> Components: Decaf
> Affects Versions: 3.9.3
> Reporter: Christoph Fetzer
> Assignee: Timothy Bish
> Priority: Major
>
> I am not shure, what I observed, maybe it is not critical at all.
> Let me describe:
> we are using the active mq C++ library to transfer measurement files (in xml
> format) compressed to an Active-MQ-server. We build the library ourselves
> with our own build system using MS Visual Studio compiler.
> What we use in release-build is:
> {code:java}
> /DDEBUG=0
> {code}
> Deep inside this library code there is a zlib that makes use of the DEBUG
> macro in that way:
> {code:java}
> #ifdef DEBUG
> ...
> #else
> .....
> #endif
> {code}
> As you see we accidentally delivered debug-code in release binaries.
> A customer told us about some files not being tansferred successfully to the
> queue. While we investigated the issue we found out, our process seems to be
> dissapearing whithout any exception, signal, whatever. We only see a message
> {code:java}
> niitt"">>invalid match
> {code}
> at the console. (which is part of our xml file: unit">)
> Inside zlib we found some check_match function that is active in case of
> DEBUG being defined that emitts exactly that message and does
> {code:java}
> exit(1);
> {code}
> as next step (decaf/internal/util/zip/deflate.c, line 1284)
> When we changed to code to correctly handle our DEBUG macro, the file is
> transferred successfully.
> What is this? Ciritcal error inside the zlib? Incorrect use of the library?
>
> Another maybe interesting fact:
> when we insert a space in the first line (all characters moved by one), we
> don't have the issue.
>
> Additional information:
> our files are coded in UTF8 but maybe don't use the proper BOM and we
> transfer a lot of UTF-8 coded characters when we transfer the measurement
> unit m/s². But as far as I understand, Active MQ handles the files as
> transparent binary messages.
>
> Please ask, if you need additional information. I am trying to find out if I
> am allowed to add an example file....
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)