[openssl-dev] [openssl.org #4474] Overflow optimizations being taken by GCC

noloader@gmail.com via RT rt at openssl.org
Thu Mar 24 11:42:05 UTC 2016


$ ./config -Wstrict-overflow
...

$ make
...

crypto/asn1/a_strex.c: In function ‘do_print_ex.constprop.3’:
crypto/asn1/a_strex.c:385:12: warning: assuming signed overflow does
not occur when simplifying conditional to constant [-Wstrict-overflow]
         if (len < 0)
            ^
crypto/asn1/a_strex.c:385:12: warning: assuming signed overflow does
not occur when simplifying conditional to constant [-Wstrict-overflow]
crypto/asn1/a_strex.c:404:8: warning: assuming signed overflow does
not occur when simplifying conditional to constant [-Wstrict-overflow]
     if (len < 0)
        ^
crypto/asn1/a_strex.c:413:8: warning: assuming signed overflow does
not occur when simplifying conditional to constant [-Wstrict-overflow]
     if (do_buf(str->data, str->length, type, flags, NULL, io_ch, arg) < 0)
        ^
crypto/asn1/a_strex.c: In function ‘do_print_ex.constprop.4’:
crypto/asn1/a_strex.c:385:12: warning: assuming signed overflow does
not occur when simplifying conditional to constant [-Wstrict-overflow]
         if (len < 0)
            ^
crypto/asn1/a_strex.c:385:12: warning: assuming signed overflow does
not occur when simplifying conditional to constant [-Wstrict-overflow]
crypto/asn1/a_strex.c:404:8: warning: assuming signed overflow does
not occur when simplifying conditional to constant [-Wstrict-overflow]
     if (len < 0)
        ^
crypto/asn1/a_strex.c:413:8: warning: assuming signed overflow does
not occur when simplifying conditional to constant [-Wstrict-overflow]
     if (do_buf(str->data, str->length, type, flags, NULL, io_ch, arg) < 0)



crypto/bio/b_print.c:716:15: warning: assuming signed overflow does
not occur when simplifying conditional to constant [-Wstrict-overflow]
         while (fplace > 0) {
               ^


crypto/bn/bn_exp.c:377:13: warning: assuming signed overflow does not
occur when simplifying conditional to constant [-Wstrict-overflow]
             for (i = 0; i < j; i++) {
             ^
crypto/bn/bn_exp.c: In function ‘BN_mod_exp_mont’:
crypto/bn/bn_exp.c:541:13: warning: assuming signed overflow does not
occur when simplifying conditional to constant [-Wstrict-overflow]
             for (i = 0; i < j; i++) {
             ^
crypto/bn/bn_exp.c: In function ‘BN_mod_exp_simple’:
crypto/bn/bn_exp.c:1433:13: warning: assuming signed overflow does not
occur when simplifying conditional to constant [-Wstrict-overflow]
             for (i = 0; i < j; i++) {
             ^


crypto/ocsp/ocsp_prn.c:96:5: warning: assuming pointer wraparound does
not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (p = ts; p < ts + len; p++)
     ^
crypto/ocsp/ocsp_prn.c: In function ‘OCSP_cert_status_str’:
crypto/ocsp/ocsp_prn.c:96:5: warning: assuming pointer wraparound does
not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (p = ts; p < ts + len; p++)
     ^
crypto/ocsp/ocsp_prn.c: In function ‘OCSP_crl_reason_str’:
crypto/ocsp/ocsp_prn.c:96:5: warning: assuming pointer wraparound does
not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (p = ts; p < ts + len; p++)
     ^
crypto/ocsp/ocsp_prn.c: In function ‘OCSP_response_status_str’:
crypto/ocsp/ocsp_prn.c:96:5: warning: assuming pointer wraparound does
not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (p = ts; p < ts + len; p++)
     ^
crypto/ocsp/ocsp_prn.c:96:5: warning: assuming pointer wraparound does
not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
crypto/ocsp/ocsp_prn.c:96:5: warning: assuming pointer wraparound does
not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
crypto/ocsp/ocsp_prn.c: In function ‘OCSP_cert_status_str’:
crypto/ocsp/ocsp_prn.c:96:5: warning: assuming pointer wraparound does
not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (p = ts; p < ts + len; p++)
     ^
crypto/ocsp/ocsp_prn.c:96:5: warning: assuming pointer wraparound does
not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
crypto/ocsp/ocsp_prn.c:96:5: warning: assuming pointer wraparound does
not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
crypto/ocsp/ocsp_prn.c: In function ‘OCSP_crl_reason_str’:
crypto/ocsp/ocsp_prn.c:96:5: warning: assuming pointer wraparound does
not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (p = ts; p < ts + len; p++)
     ^
crypto/ocsp/ocsp_prn.c:96:5: warning: assuming pointer wraparound does
not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
crypto/ocsp/ocsp_prn.c:96:5: warning: assuming pointer wraparound does
not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]



ssl/ssl_lib.c:4023:50: warning: assuming signed overflow does not
occur when simplifying conditional to constant [-Wstrict-overflow]
         if (ct_extract_tls_extension_scts(s) < 0 ||
                                                  ^



apps/ca.c:619:8: warning: assuming signed overflow does not occur when
simplifying conditional to constant [-Wstrict-overflow]
     if (!selfsign)
        ^
apps/ca.c:758:12: warning: assuming signed overflow does not occur
when simplifying conditional to constant [-Wstrict-overflow]
         if (i == -1) {
            ^
apps/ca.c:1955:8: warning: assuming signed overflow does not occur
when simplifying conditional to constant [-Wstrict-overflow]
     if (!notext)
        ^



apps/dhparam.c:248:18: warning: assuming signed overflow does not
occur when simplifying conditional to constant [-Wstrict-overflow]
     if (dsaparam && g) {
                  ^


apps/genpkey.c:207:8: warning: assuming signed overflow does not occur
when simplifying conditional to constant [-Wstrict-overflow]
     if (do_param)
        ^


apps/srp.c:643:8: warning: assuming signed overflow does not occur
when simplifying conditional to constant [-Wstrict-overflow]
     if (errors != 0)
        ^
apps/srp.c:643:8: warning: assuming signed overflow does not occur
when simplifying conditional to constant [-Wstrict-overflow]
apps/srp.c:647:8: warning: assuming signed overflow does not occur
when simplifying conditional to constant [-Wstrict-overflow]
     if (verbose)
        ^
apps/srp.c:632:12: warning: assuming signed overflow does not occur
when simplifying conditional to constant [-Wstrict-overflow]
         if (verbose)
            ^
apps/srp.c:627:12: warning: assuming signed overflow does not occur
when simplifying conditional to constant [-Wstrict-overflow]
         if (verbose)
            ^


-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=4474
Please log in as guest with password guest if prompted



More information about the openssl-dev mailing list