On Mon, 31 Dec 2012, Jonas Walld?n @ Pike  developers forum wrote:

As far as I can see its the latest change, which turned the macro
into fuctions. I think its overall quite mysterious under which
circumstances gcc (or clang) optimize that check away. In particular
because compilers change and something that works now might break
tomorrow.

I don't know for sure if the old code relied on undefined behavior or
if Clang simply miscompiled it. The macro -> function transformation
did not really alter the semantics other than introducing volatile
attributes so if the new form breaks gcc I suppose we were just lucky
with the old one.
Yes, I think so, too. The failures happen in the pike parser, where
those overflow checks are optimized away and overflowing char constants
are not detected.

That said, I think it makes sense to use something which does _not_
involve any undefined behavior.

Agreed. If people mind the 7.9 instability with gcc I can revert the
bignum patch since Clang isn't default even on OS X 10.8, but maybe we
can give it a few days first.

I dont think its an issue if 7.9 is temporarily broken. I started putting
together a patch with standard compliant overflow checks based on the cert.org
link you sent and some other sources. will push a branch once I have
something presentable.
  • War... Martin Nilsson (Opera Mini - AFK!) @ Pike (-) developers forum
  • War... Mirar @ Pike developers forum
    • ... Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum
      • ... Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum
        • ... Jonas Walld�n @ Pike developers forum
          • ... Jonas Walld�n @ Pike developers forum
            • ... Arne Goedeke
              • ... Jonas Walld�n @ Pike developers forum
              • ... Arne Goedeke
              • ... Jonas Walld�n @ Pike developers forum
              • ... Arne Goedeke
            • ... Peter Bortas @ Pike developers forum
  • War... Martin Nilsson (Opera Mini - AFK!) @ Pike (-) developers forum
  • War... Mirar @ Pike developers forum

Reply via email to