You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed there were two implementations of integer printing, one for printing object ints and the other for printing C ints. (mp_print_int vs mp_print_mp_int).
I thought: hey, on platforms with (mpz) long integers, we can create a long integer without allocating any memory, and get rid of the extra implementation of decimal conversion.
Oops, mpz_as_str_inpl does allocations down inside. So it recurses infinitely (or until it hits a stack limit) through m_malloc_fail.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I noticed there were two implementations of integer printing, one for printing object ints and the other for printing C ints. (mp_print_int vs mp_print_mp_int).
I thought: hey, on platforms with (mpz) long integers, we can create a long integer without allocating any memory, and get rid of the extra implementation of decimal conversion.
Oops, mpz_as_str_inpl does allocations down inside. So it recurses infinitely (or until it hits a stack limit) through m_malloc_fail.
Beta Was this translation helpful? Give feedback.
All reactions