Please, use clang instead of gcc. Code quality can only profit from it. I just compiled 2.3.4 and compiler stderr is full of interesting problems. -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20190103/83b1b813/attachment.html>
<!doctype html> <html> <head> <meta charset="UTF-8"> </head> <body> <div> We compile all core code with both gcc and clang. What sort of interesting things did you find? </div> <div> <br> </div> <div> Aki </div> <blockquote type="cite"> <div> On 03 January 2019 at 11:50 Rupert Gallagher via dovecot < <a href="mailto:dovecot@dovecot.org">dovecot@dovecot.org</a>> wrote: </div> <div> <br> </div> <div> <br> </div> <div> Please, use clang instead of gcc. Code quality can only profit from it. I just compiled 2.3.4 and compiler stderr is full of interesting problems. </div> </blockquote> <div> <br> </div> <div class="io-ox-signature"> --- <br>Aki Tuomi </div> </body> </html>
The compiler returns many warnings, and the test returns two IPv6-related errors. I am attaching both logs as reference.> ??????? Original Message ??????? > On Thursday, January 3, 2019 9:53 AM, Aki Tuomi <aki.tuomi at open-xchange.com> wrote: > >> We compile all core code with both gcc and clang. What sort of interesting things did you find? >> >> Aki >> >>> On 03 January 2019 at 11:50 Rupert Gallagher via dovecot < dovecot at dovecot.org> wrote: >>> >>> Please, use clang instead of gcc. Code quality can only profit from it. I just compiled 2.3.4 and compiler stderr is full of interesting problems. >> >> --- >> Aki Tuomi-------------- next part -------------- An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20190103/ca9853ac/attachment-0001.html> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: compiler-stderr.log URL: <https://dovecot.org/pipermail/dovecot/attachments/20190103/ca9853ac/attachment-0002.log> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: test.log URL: <https://dovecot.org/pipermail/dovecot/attachments/20190103/ca9853ac/attachment-0003.log>
On 1/3/19 4:50 AM, Rupert Gallagher via dovecot wrote:> Please, use clang instead of gcc. Code quality can only profit from it. I just compiled 2.3.4 and compiler stderr is full of interesting problems. >oh please
Hi all! On 03/01/2019 10:50, Rupert Gallagher via dovecot wrote:> Please, use clang instead of gcc. Code quality can only profit from it. > I just compiled 2.3.4 and compiler stderr is full of interesting problems.?But obviously not interesting enough to share the clang command line and the output from it. MfG, Bernd -- "I dislike type abstraction if it has no real reason. And saving on typing is not a good reason - if your typing speed is the main issue when you're coding, you're doing something seriously wrong." - Linus Torvalds -------------- next part -------------- A non-text attachment was scrubbed... Name: pEpkey.asc Type: application/pgp-keys Size: 2472 bytes Desc: not available URL: <https://dovecot.org/pipermail/dovecot/attachments/20190103/5ddbd8f0/attachment.bin>
> On 3 Jan 2019, at 14.04, Ruben Safir <ruben at mrbrklyn.com> wrote: > > On 1/3/19 4:50 AM, Rupert Gallagher via dovecot wrote: >> Please, use clang instead of gcc. Code quality can only profit from it. I just compiled 2.3.4 and compiler stderr is full of interesting problems. >> > > > oh pleaseThis is not very helpful. Sami
The arithmetic stuff has already been fixed in master with https://github.com/dovecot/core/commit /5cccb4af850bb3ba81e73a8fb4f6881c3e1d4046.patch https://github.com/dovecot/core/commit /ac7aa955db4c77bbb169baa5d104a4c128674646.patch I have not seen the second error ever, it would need more information, can you gdb to it and see what the actual value is? Aki> On 03 January 2019 at 13:38 Rupert Gallagher via dovecot <dovecot at dovecot.org> wrote: > > > The compiler returns many warnings, and the test returns two IPv6-related errors. I am attaching both logs as reference. > > > ??????? Original Message ??????? > > On Thursday, January 3, 2019 9:53 AM, Aki Tuomi <aki.tuomi at open-xchange.com> wrote: > > > >> We compile all core code with both gcc and clang. What sort of interesting things did you find? > >> > >> Aki > >> > >>> On 03 January 2019 at 11:50 Rupert Gallagher via dovecot < dovecot at dovecot.org> wrote: > >>> > >>> Please, use clang instead of gcc. Code quality can only profit from it. I just compiled 2.3.4 and compiler stderr is full of interesting problems. > >> > >> --- > >> Aki Tuomi
The unit test problems aren't clang issues, they're OSX issues. So: test-net.c:79: Assert failed: strcmp(net_ip2addr(&ip), "::5") == 0 test-net.c:83: Assert failed: strcmp(net_ip2addr(&ip), "::5") == 0 This is because OSX writes the address out as "::0.0.0.5" instead of "::5". I don't remember if the core code should be fixed or if it's just the unit test that needs fixing. test-lib(26058,0x7fff95cf7380) malloc: *** mach_vm_map(size=9223372036854775808) failed (error code=3) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug fatal_mempool_alloconly .............................................. : ok test-lib(26058,0x7fff95cf7380) malloc: *** mach_vm_map(size=9223372036854775808) failed (error code=3) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug fatal_mempool_allocfree .............................................. : ok I'm pretty sure these are intentional. The unit tests are succeeding, and the unit tests are there to test failing memory allocations. OSX just wants to also write some extra errors to stderr.> On 3 Jan 2019, at 13.38, Rupert Gallagher via dovecot <dovecot at dovecot.org> wrote: > > The compiler returns many warnings, and the test returns two IPv6-related errors. I am attaching both logs as reference. > >> ??????? Original Message ??????? >> On Thursday, January 3, 2019 9:53 AM, Aki Tuomi <aki.tuomi at open-xchange.com> wrote: >> >>> We compile all core code with both gcc and clang. What sort of interesting things did you find? >>> >>> Aki >>>> On 03 January 2019 at 11:50 Rupert Gallagher via dovecot < dovecot at dovecot.org <mailto:dovecot at dovecot.org>> wrote: >>>> >>>> >>>> Please, use clang instead of gcc. Code quality can only profit from it. I just compiled 2.3.4 and compiler stderr is full of interesting problems. >>> >>> --- >>> Aki Tuomi > <compiler-stderr.log><test.log>-------------- next part -------------- An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20190108/4f80612d/attachment.html>