

The customerid field is defined in the database as follows: This binding seems to be required to induce the crash.

We are binding one parameter using SQLBindParameter to the customerid field. I will attach the table.Īs a reminder, we see this crash on Macintosh only when our executable is compiled with Address Sanitizer. We can reproduce the crash using the query shown above with this table. Howard Rodstein We have come up with a simplified table. If not, perhaps a simplified data and SQL query where we could try it on our side. Would it be possible for you to make a short independent test case? Unfortunately, it is hard to come to any conclusions using just the query you specified. However, in this situation I believe it could be different since it happens at the stage of reading the results. Client application can give SQL_NTS instead of the string lengthĪnd in this way indicate that the string is null-terminated. Client application can supply the length of the string.Ģ. However, in that particular case the logic of ODBC is this:ġ. You are right, strlen() function can be dangerous if used on strings not terminated by 0x00 byte. It is not S1 (Represents a complete loss of service, a significant functionality is missing, a system that hangs indefinitely and there is no available workaround.) because it works without the sanitizer.
#Igor pro 7 crashing code
If you look at the code for fill_fetch_buffers and consider how it is affected by the presence of "OR orderType IS NULL", you may find that you are calling strlen on unallocated or uninitialized memory or on text that is not null-terminated.įirst of all, we need to adjust the severity of this bug. The database that we are accessing contains customer information that we have to keep private so I can't give you access to it.
#Igor pro 7 crashing windows
I suspect that this would also crash on Unix or Windows if running Address Sanitizer. This means your client would have to be running under Xcode. You would have to access the database via MyODBC with Address Sanitizer turned on. You would have to create a MySQL database on which you can do a query like the one above. We are accessing our MySQL server via MyODBC on Macintosh, 64-bit. If Address Sanitizer is turned off, there is no crash. This kind of Address Sanitizer violation in strlen usually indicates accessing unallocated or uninitialized memory or on text that is not null-terminated. The buffer where the violation is occurring is not memory that the client allocated. Wrap_strlen // libclang_rt.asan_osx_dynamic.dylib The stack crawl at the time of the crash is: Removing " OR orderType IS NULL" eliminates the crash. SELECT orderID,orderDate,customerRefNum,orderStatus from orderTable WHERE customerID=0 AND (orderType='Standard' OR orderType IS NULL) Order by orderID Executing this query while running under Address Sanitizer causes Address Sanitizer to flag a buffer read violation (reading unallocated memory) in the strlen function:
