diff options
author | Lukas Larsson <[email protected]> | 2016-05-17 15:07:03 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2016-05-17 15:07:03 +0200 |
commit | 28f5de6eb21a4798b7033dc9d94e7b787fd4c0ce (patch) | |
tree | 3343c0940936683eb42b032653ddb9c6972e9baf | |
parent | 49d43cd5c5058b5244d0b8e57667fb22c7eb3a09 (diff) | |
parent | 32a8787eb7651d41371afdf3f55fd3a77486861d (diff) | |
download | otp-28f5de6eb21a4798b7033dc9d94e7b787fd4c0ce.tar.gz otp-28f5de6eb21a4798b7033dc9d94e7b787fd4c0ce.tar.bz2 otp-28f5de6eb21a4798b7033dc9d94e7b787fd4c0ce.zip |
Merge branch 'lukas/erts/re-openbsd-gcc-bug/OTP-13602'
* lukas/erts/re-openbsd-gcc-bug/OTP-13602:
erts: Fix OpenBSD gcc compiler bug in re code
-rw-r--r-- | erts/emulator/beam/erl_bif_re.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_bif_re.c b/erts/emulator/beam/erl_bif_re.c index f4daecd2a4..ff7746ce1d 100644 --- a/erts/emulator/beam/erl_bif_re.c +++ b/erts/emulator/beam/erl_bif_re.c @@ -630,9 +630,15 @@ static Eterm build_exec_return(Process *p, int rc, RestartContext *restartp, Ete } } else { ReturnInfo *ri; - ReturnInfo defri = {RetIndex,0,{0}}; + ReturnInfo defri; if (restartp->ret_info == NULL) { + /* OpenBSD 5.8 gcc compiler for some reason creates + bad code if the above initialization is done + inline with the struct. So don't do that. */ + defri.type = RetIndex; + defri.num_spec = 0; + defri.v[0] = 0; ri = &defri; } else { ri = restartp->ret_info; |