Opened 11 years ago

Closed 11 years ago

#415 closed defect/bug (fixed)

Infinite loop in int_sqrt

Reported by: jehan.dev Owned by: KaZeR
Priority: critical Milestone:
Component: core Version: git master
Severity: Keywords:
Cc: jehan.dev@…

Description

In case of big value, int_sqrt(x) is blocking. Indeed, if q is equal to 0 in first loop (due to rollover of int), we will never exit the loop.

Please find below in attachment a dirty patch.

Attachments (2)

dirty_sqrt.diff (448 bytes) - added by jehan.dev 11 years ago.
Dirty patch
int_sqrt-terminate1.patch (417 bytes) - added by timo lindfors 11 years ago.
proposed fix

Download all attachments as: .zip

Change History (5)

Changed 11 years ago by jehan.dev

Dirty patch

comment:1 Changed 11 years ago by kazer

  • Resolution set to fixed
  • Status changed from new to closed

Applied in r2463 , thank you!

comment:2 Changed 11 years ago by timo lindfors

  • Resolution fixed deleted
  • Status changed from closed to reopened

The patch is not in svn head anymore and I hit the bug again. For example calling int_sqrt with 1899652352 never terminates.

Changed 11 years ago by timo lindfors

proposed fix

comment:3 Changed 11 years ago by singesang

  • Resolution set to fixed
  • Status changed from reopened to closed

Applied in r2677. Thanks for the patch.

Note: See TracTickets for help on using tickets.