1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-21 20:20:24 +02:00
guile/module
Andy Wingo 8304b15807 Fix range inference on division in unreachable code
* module/language/cps/types.scm (div-result-range): It is possible for a
  max value to be less than a minimum.  In this bug from zig:

    (define (benchmark x)
      (let loop ((count 0)
                 (sum 0))
        (if (= count 10)
            (exact->inexact (/ sum 10)))
        (loop (+ count 1) x)))

  Here the first iteration gets peeled, and thus the first "if" can't be
  true, because "count" is zero.  However on the true branch of the if,
  range inference produces bogus ranges -- notably, the variable bound
  to 10 is inferred to have a min of 10 and a max of 0.  This is fine,
  because it's unreachable; but that then infects the division, because
  the same variable bound to 10 is used there, resulting in division by
  zero.
2019-11-27 16:03:59 +01:00
..
ice-9 Install exception converters and printers from boot-9 2019-11-21 16:48:35 +01:00
language Fix range inference on division in unreachable code 2019-11-27 16:03:59 +01:00
oop goops: Fix 'instance?' to work on objects that aren't structs. 2018-08-07 12:05:31 +02:00
rnrs Move adapter between "throw" and "raise" exceptions into core 2019-11-05 09:36:36 +01:00
scheme Add initial implementation of R7RS modules 2019-11-16 21:09:46 +01:00
scripts Deprecate passing a non-zero size to make-module 2019-09-27 22:57:38 +02:00
srfi SRFI-18 uses core exceptions 2019-11-14 16:33:10 +01:00
sxml Remove duplicate definitions of call/ec' and let/ec'. 2013-04-06 15:40:19 +02:00
system Fix frame-call-representation for callees without closures 2019-11-27 15:04:55 +01:00
texinfo Merge from stable-2.2 2019-08-02 15:21:59 +02:00
web Merge from stable-2.2 2019-08-02 15:30:13 +02:00
Makefile.am Add initial implementation of R7RS modules 2019-11-16 21:09:46 +01:00
rnrs.scm Define top-level bindings for aux syntax: else, =>, _, ... 2019-09-12 21:50:51 +02:00
statprof.scm VM manages hook sets itself 2018-09-14 08:52:24 +02:00
texinfo.scm texinfo: fix @url{@@} parsing 2014-11-09 15:56:33 +00:00