# Where do I report bugs in Clang?



## Nyantastic (Aug 30, 2018)

I found a bug in /usr/bin/cc. Looking at https://bugs.freebsd.org, I'm not sure where I should report it. Can anyone help direct me to the correct place? Or should I be reporting it elsewhere, like a Clang list?


----------



## rigoletto@ (Aug 30, 2018)

The bugs address you posted is the place to report bugs, but the development is done on Mail Lists so you may want to bring it in there instead ( will probably also get attention faster ) since there is where the developers hang.

EDIT: freebsd-toolchain should be the right one.


----------



## Nyantastic (Aug 31, 2018)

lebarondemerde said:


> The bugs address you posted is the place to report bugs, but the development is done on Mail Lists so you may want to bring it in there instead ( will probably also get attention faster ) since there is where the developers hang.
> 
> EDIT: freebsd-toolchain should be the right one.


I have looked at the archives there and it seems to be a replication of the bugzilla archives:

https://lists.freebsd.org/pipermail/freebsd-toolchain/2018-August/thread.html

Perhaps it's better to post to the bugzilla after all. It seems to be "Product: Base system" and "Component: misc" are the places. 

The bug I found involves the removal of a variable under optimisation within a long C function, so that a calculation gives the wrong answer if optimisation is switched on, so it is quite a lot of work just preparing the bug report. I'll try to send it in by the end of the weekend.


----------



## rigoletto@ (Aug 31, 2018)

Clang is Base!


----------



## Terry_Kennedy (Sep 1, 2018)

Nyantastic said:


> I have looked at the archives there and it seems to be a replication of the bugzilla archives:
> 
> https://lists.freebsd.org/pipermail/freebsd-toolchain/2018-August/thread.html


Quite a few of the mailing lists get CC'd by Bugzilla when a bug is reported against the component(s) the list handles. It is a way for all interested developers to get notifications of relevant bug reports without needing to be added to the "also-automatic-CC" function in Bugzilla.


> The bug I found involves the removal of a variable under optimisation within a long C function, so that a calculation gives the wrong answer if optimisation is switched on, so it is quite a lot of work just preparing the bug report. I'll try to send it in by the end of the weekend.


You might want to see if it is reproducible under the latest clang/LLVM release (probably easiest to do from ports). If it is, then you should submit a bug upstream and if a patch is developed, ask the FreeBSD toolchain maintainers to backport it to the versions FreeBSD uses. If it isn't reproducible under the latest releases, then you need to take your best guess as to whether it is a FreeBSD-specific bug or a clang/LLVM bug that was already fixes in a version newer than what FreeBSD is using.

I did something like this a little over a year ago, when I found an... "issue" (can't call it a "bug", because it was in code dmr wrote). It turns out the code was depending on a particular stack layout that hasn't been seen since V7 Unix or gcc 2.95. Yet it passed -Wall on every compiler it was tried on. Here is that bug report, in case you're interested in the gory details.


----------

