[erlang-bugs] make docs fails in git master

Tuncer Ayaz tuncer.ayaz@REDACTED
Fri Oct 5 21:59:13 CEST 2012


On Fri, Oct 5, 2012 at 5:48 PM, Patrik Nyblom wrote:
> On 10/05/2012 04:40 PM, Tuncer Ayaz wrote:
>>
>> On Fri, Oct 5, 2012 at 4:16 PM, Patrik Nyblom wrote:
>>>
>>> Right, found it, a C statement with "undefined behaviour" exposed
>>> by gcc 4.7. There is actually a warning from gcc. Try this patch
>>> to master:
>>> ----------------------
>>> diff --git a/erts/emulator/beam/erl_message.c
>>> b/erts/emulator/beam/erl_message.c
>>> index e397f07..d5b7d01 100644
>>> --- a/erts/emulator/beam/erl_message.c
>>> +++ b/erts/emulator/beam/erl_message.c
>>> @@ -1096,7 +1096,6 @@ erts_send_message(Process* sender,
>>>          }
>>>           BM_SWAP_TIMER(send,system);
>>>   #endif /* #ifndef ERTS_SMP */
>>> -       return;
>>>       }
>>>      return res;
>>>   }
>>> ---------------
>>
>> Thanks, that's it.
>
>
> Great! Thanks for the help with the huge bisect and the error
> report!
>
> Fix will appear in master in a couple of days (hopefully :))!

clang-3.2-git treats this as an error

beam/erl_message.c:1099:2: error: non-void function 'erts_send_message'
  should return a value [-Wreturn-type]

while for gcc 4.7.1 it's a warning

beam/erl_message.c:1099:2: warning: 'return' with no value, in
  function returning non-void [-Wreturn-type]

I don't have a gcc-4.8-git build to check with, but we can treat this
warning as an error with gcc-4.7:

$ CFLAGS="-Werror=return-type" ./otp_build setup -a
[...]
beam/erl_message.c:1099:2: error: 'return' with no value, in function
  returning non-void [-Werror=return-type]
cc1: some warnings being treated as errors

http://gcc.gnu.org/wiki/ClangDiagnosticsComparison

> Cheers,
> /Patrik
>>
>>
>>> Cheers,
>>> /Patrik
>>>
>>> On 10/03/2012 09:26 PM, Tuncer Ayaz wrote:
>>>>
>>>> On Tue, Oct 2, 2012 at 6:58 PM, Tuncer Ayaz wrote:
>>>>>
>>>>> On Tue, Oct 2, 2012 at 6:24 PM, Patrik Nyblom wrote:
>>>>>>
>>>>>>
>>>>>> On Tue, 2 Oct 2012, Tuncer Ayaz wrote:
>>>>>>
>>>>>>> On Tue, Oct 2, 2012 at 5:59 PM, Patrik Nyblom wrote:
>>>>>>>>
>>>>>>>> And you configure parameters are?
>>>>>>>
>>>>>>>
>>>>>>> Nothing explicit, just automatic flags, with the fresh
>>>>>>> rebuild. Not even --prefix. I'll mail you the configure.log
>>>>>>> files? Anything else?
>>>>>>
>>>>>>
>>>>>> Could you send me a complete log, from git clean -xfd to the
>>>>>> crash? And what Linux/Unix distro you use?
>>>>>>
>>>>>> BTW, what's in your ERL_FLAGS when you do no set it to "-smp
>>>>>> disable", anything fancy there?
>>>>>>
>>>>>> And the erl_crash.dump you get when running erl -smp disable
>>>>>> might help.
>>>>>
>>>>> Mailed you all the info and files.
>>>>>
>>>>>> Sorry, I'm clueless on this one. Did it work in R15B02 plain?
>>>>>> Do you know a point when it stopped working?
>>>>>
>>>>> No, I haven't bisected. Want me to?
>>>>
>>>> result of git-bisect started with OTP_R15B02=good and
>>>> g3ba23ad=bad: e76262ea8ac6986a4 is the first bad commit



More information about the erlang-bugs mailing list