<feed xmlns='http://www.w3.org/2005/Atom'>
<title>otp.git/erts/include, branch master</title>
<subtitle>Mirror of Erlang/OTP repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/'/>
<entry>
<title>erts: Skip ERTS_NOINLINE on non-GCC-compatible compilers</title>
<updated>2019-04-08T05:23:32+00:00</updated>
<author>
<name>John Högberg</name>
<email>john@erlang.org</email>
</author>
<published>2019-04-08T04:15:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=0b6006dc4d2c9818c8d91ee364ed7d6aa660ed76'/>
<id>0b6006dc4d2c9818c8d91ee364ed7d6aa660ed76</id>
<content type='text'>
__declspec(noinline) works fine on MSVC but requires us to place
the macro before a function rather than after, which in turn causes
early versions of GCC to puke since they only accept __attribute__
at the end of a function declaration.

Since this is a new macro that previously only saw use in beam_emu,
I figured it's easiest to leave it disabled on MSVC.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
__declspec(noinline) works fine on MSVC but requires us to place
the macro before a function rather than after, which in turn causes
early versions of GCC to puke since they only accept __attribute__
at the end of a function declaration.

Since this is a new macro that previously only saw use in beam_emu,
I figured it's easiest to leave it disabled on MSVC.
</pre>
</div>
</content>
</entry>
<entry>
<title>stdlib: fix re:replace on LTO builds</title>
<updated>2019-03-29T23:24:11+00:00</updated>
<author>
<name>Sergei Trofimovich</name>
<email>slyfox@gentoo.org</email>
</author>
<published>2019-03-28T08:38:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=ed751968d8dc4c0b58210247e94409a8a52cc501'/>
<id>ed751968d8dc4c0b58210247e94409a8a52cc501</id>
<content type='text'>
Fabio Coatti reported elixir build failure in https://bugs.gentoo.org/681778.
The minimal reproducer looks like that (from otp git tree):

    $ ./configure CFLAGS='-O2 -flto' LDFLAGS='-O2 -flto=8'
    $ make
    $ ERL_TOP=$PWD \
      PATH=$ERL_TOP/bin:$PATH \
        \
        bin/erl \
        \
        -noshell -eval 're:replace("a","b","c",[{return,list}]).' \
        -s erlang halt

    {"init terminating in do_boot",{badarg,[{re,replace,["a","b","c",[{return,list}]],
        [{file,"re.erl"},{line,362}]},
         {erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,680}]},
         {init,start_it,1,[]},
         {init,start_em,1,[]},
         {init,do_boot,3,[]}]}}
    init terminating in do_boot ({badarg,[{re,replace,[[_],[_],[_],[_]],[{_},{_}]},
        {erl_eval,do_apply,6,[{_},{_}]},{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]})
    Crash dump is being written to: erl_crash.dump...done

The failure happens in libpcre2 where stack overflow is mis-identified
at function entry of

    erts_pcre_compile2()
        compile_regex()
          if (PUBL(stack_guard) != NULL &amp;&amp; PUBL(stack_guard)())
          {
              *errorcodeptr= ERR85;
              return FALSE;
          }

The stack "overflow" detection happens in

    thr_wrapper()
        ethr_set_stacklimit__()

because the stack usage code relies on the fact that ethr_set_stacklimit__()
and similar functions don't get inlined into callers for stack growth
measurement.

Before the change inlining avoidance was achieved by putting functions
into standalone translation units. LTO makes this technique inefficient.

The change marks functions explicitly as __attribute__((__noinline__)) on gcc.

Reported-by: Fabio Coatti
Bug: https://bugs.gentoo.org/681778
Signed-off-by: Sergei Trofimovich &lt;slyfox@gentoo.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fabio Coatti reported elixir build failure in https://bugs.gentoo.org/681778.
The minimal reproducer looks like that (from otp git tree):

    $ ./configure CFLAGS='-O2 -flto' LDFLAGS='-O2 -flto=8'
    $ make
    $ ERL_TOP=$PWD \
      PATH=$ERL_TOP/bin:$PATH \
        \
        bin/erl \
        \
        -noshell -eval 're:replace("a","b","c",[{return,list}]).' \
        -s erlang halt

    {"init terminating in do_boot",{badarg,[{re,replace,["a","b","c",[{return,list}]],
        [{file,"re.erl"},{line,362}]},
         {erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,680}]},
         {init,start_it,1,[]},
         {init,start_em,1,[]},
         {init,do_boot,3,[]}]}}
    init terminating in do_boot ({badarg,[{re,replace,[[_],[_],[_],[_]],[{_},{_}]},
        {erl_eval,do_apply,6,[{_},{_}]},{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]})
    Crash dump is being written to: erl_crash.dump...done

The failure happens in libpcre2 where stack overflow is mis-identified
at function entry of

    erts_pcre_compile2()
        compile_regex()
          if (PUBL(stack_guard) != NULL &amp;&amp; PUBL(stack_guard)())
          {
              *errorcodeptr= ERR85;
              return FALSE;
          }

The stack "overflow" detection happens in

    thr_wrapper()
        ethr_set_stacklimit__()

because the stack usage code relies on the fact that ethr_set_stacklimit__()
and similar functions don't get inlined into callers for stack growth
measurement.

Before the change inlining avoidance was achieved by putting functions
into standalone translation units. LTO makes this technique inefficient.

The change marks functions explicitly as __attribute__((__noinline__)) on gcc.

Reported-by: Fabio Coatti
Bug: https://bugs.gentoo.org/681778
Signed-off-by: Sergei Trofimovich &lt;slyfox@gentoo.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>erts: Fix benign typo in ethr_dw_atomic.h files</title>
<updated>2018-11-12T13:48:28+00:00</updated>
<author>
<name>Sverker Eriksson</name>
<email>sverker@erlang.org</email>
</author>
<published>2018-11-12T13:47:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=0435e2adbc743382968718dd838d3abe57c17a14'/>
<id>0435e2adbc743382968718dd838d3abe57c17a14</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Change "can not" into "cannot"</title>
<updated>2018-07-27T08:16:17+00:00</updated>
<author>
<name>Raimo Niskanen</name>
<email>raimo@erlang.org</email>
</author>
<published>2018-07-26T12:14:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=37c11cda19bd9067a4e094fbde53b276d6ab0d3d'/>
<id>37c11cda19bd9067a4e094fbde53b276d6ab0d3d</id>
<content type='text'>
I did not find any legitimate use of "can not", however skipped
changing e.g RFCs archived in the source tree.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I did not find any legitimate use of "can not", however skipped
changing e.g RFCs archived in the source tree.
</pre>
</div>
</content>
</entry>
<entry>
<title>Update copyright year</title>
<updated>2018-06-18T12:51:18+00:00</updated>
<author>
<name>Henrik Nord</name>
<email>henrik@erlang.org</email>
</author>
<published>2018-06-18T12:51:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=5ca92e2eac1e84fd22f60e7abc3aa2b0ff1cb42b'/>
<id>5ca92e2eac1e84fd22f60e7abc3aa2b0ff1cb42b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Buffer writing of crash dumps</title>
<updated>2017-10-18T12:05:00+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2017-10-13T11:28:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=360d26b21c169b0c88d6ca43265cbcfa3ce9ef74'/>
<id>360d26b21c169b0c88d6ca43265cbcfa3ce9ef74</id>
<content type='text'>
Writing of crash dumps were done using unbuffered IO. This
is slow since many small writes are done.

Use a FILE* with an allocated buffer to obtain buffered IO.

I wrote a small test program that created 50000 binaries of 200 bytes
each and then created a crash dump. The crash dumping was an order of
magnitude faster with buffered IO than without.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Writing of crash dumps were done using unbuffered IO. This
is slow since many small writes are done.

Use a FILE* with an allocated buffer to obtain buffered IO.

I wrote a small test program that created 50000 binaries of 200 bytes
each and then created a crash dump. The crash dumping was an order of
magnitude faster with buffered IO than without.
</pre>
</div>
</content>
</entry>
<entry>
<title>Update copyright year</title>
<updated>2017-05-04T13:42:21+00:00</updated>
<author>
<name>Raimo Niskanen</name>
<email>raimo@erlang.org</email>
</author>
<published>2017-05-04T13:42:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=83e20c62057ebc1d8064bf57b01be560cd244e1d'/>
<id>83e20c62057ebc1d8064bf57b01be560cd244e1d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'rickard/pcre-8.40'</title>
<updated>2017-04-11T13:05:51+00:00</updated>
<author>
<name>Rickard Green</name>
<email>rickard@erlang.org</email>
</author>
<published>2017-04-11T13:05:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=92a3b1a37182527d0bf8b6242d54e7fae6f4bbf9'/>
<id>92a3b1a37182527d0bf8b6242d54e7fae6f4bbf9</id>
<content type='text'>
OTP-14331

* rickard/pcre-8.40:
  Update documentation
  Update README.pcre_update.md
  Stack guard for PCRE
  Adjust for incompatibility between PCRE 8.40 and perl 5.22.1
  Generate re replacement and split tests with perl vsn 5.22.1
  Fix re_SUITE:pcre_compile_workspace_overflow/1
  Skip line with lockout of modifiers in PCRE tests
  Update tests for PCRE version 8.40
  Update PCRE to version 8.40

Conflicts:
	erts/emulator/beam/beam_debug.c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
OTP-14331

* rickard/pcre-8.40:
  Update documentation
  Update README.pcre_update.md
  Stack guard for PCRE
  Adjust for incompatibility between PCRE 8.40 and perl 5.22.1
  Generate re replacement and split tests with perl vsn 5.22.1
  Fix re_SUITE:pcre_compile_workspace_overflow/1
  Skip line with lockout of modifiers in PCRE tests
  Update tests for PCRE version 8.40
  Update PCRE to version 8.40

Conflicts:
	erts/emulator/beam/beam_debug.c
</pre>
</div>
</content>
</entry>
<entry>
<title>Stack guard for PCRE</title>
<updated>2017-04-07T13:02:10+00:00</updated>
<author>
<name>Rickard Green</name>
<email>rickard@erlang.org</email>
</author>
<published>2017-04-05T12:32:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=8f452530e61b299d4d48f82f41ab5364723607ae'/>
<id>8f452530e61b299d4d48f82f41ab5364723607ae</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed typos in erts</title>
<updated>2017-02-14T09:31:29+00:00</updated>
<author>
<name>Andrew Dryga</name>
<email>andrew@dryga.com</email>
</author>
<published>2017-02-14T09:30:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=7c06ca6231b812965305522284dd9f2653ced98d'/>
<id>7c06ca6231b812965305522284dd9f2653ced98d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
