I receive error reports with a Division by zero crash, and the crash occurs at a function called __alldiv. This function is not called anywhere in my code, I searched for it with Find in files.
Asked
Active
Viewed 3,176 times
4
-
Look at: http://stackoverflow.com/questions/482624/using-64-bits-integers-without-c-runtime-link-error-alldiv – Adriano Repetti Mar 06 '12 at 16:28
2 Answers
4
__alldiv
is the function from Visual Studio C runtime library which handles 64-bit integer division in 32-bit environment, it looks similar to this: http://www.jbox.dk/sanos/source/lib/lldiv.asm.html

Igor Korkhov
- 8,283
- 1
- 26
- 31
3
__alldiv
is MSVC's integer division function.
When you emit an integer division in your code, it doesn't always map one-to-one to the div
or idiv
assembly instruction. This is due to differences between the language specified behavior and the actual behavior of the div
and idiv
instructions.
Therefore MSVC invokes a function call to its own integer division function.

Mysticial
- 464,885
- 45
- 335
- 332