Message71117
We started using Python 2.5.2 recently and a few developers have
complained that they do not get any assertions anymore so yes, we do
use _ASSERT() and _ASSERTE(), but after a brief look it seems as if we
mainly use assert(). The developer using _ASSERT() cannot remember why
this was necessary and the tests I have made today shows that we could
probably move to assert() everywhere.
A more interesting aspect is that we have recently moved the the more
secure CRT routines (strcpy_s etc) and tests have shown issues with
these if we turn off assertions:
int prevCrtReportMode=_CrtSetReportMode(_CRT_ASSERT,0);
char str[8];
strcpy_s(str,"123456789");
With assertions turned on, I get an assertion dialog saying "Buffer is
too small" which is what I expect and want. With assertions turned off
(as in the example above), I get a dialog saying "Microsoft Visual
Studio C Runtime Library has detected a fatal error in crt.exe.".
The stack is still useful and we can find the cause of the error so it
is not a serious problem for us since we will continue to turn on
assertions after Py_Initialize().
I have not yet seen any examples where the are erroneous assertions.
Anyway, you have made your point and I really do not want to take up
anymore of your time. I respect your opinion and at least I have forced
you to think about this. We have a workaround that works for us so I am
OK with closing this issue.
Many thanks! |
|
Date |
User |
Action |
Args |
2008-08-14 09:48:18 | abe | set | recipients:
+ abe, loewis |
2008-08-14 09:48:18 | abe | set | messageid: <1218707298.0.0.670382826814.issue3545@psf.upfronthosting.co.za> |
2008-08-14 09:48:17 | abe | link | issue3545 messages |
2008-08-14 09:48:15 | abe | create | |
|