[CFT]: ClangBSD is selfhosting, we need testers now

Alexander Best alexbestms at wwu.de
Wed Apr 21 17:22:12 UTC 2010


Roman Divacky schrieb am 2010-04-21:
> On Wed, Apr 21, 2010 at 05:20:57PM +0200, Alexander Best wrote:
> > i might have stumbled upon a problem with clang. i've compiled a
> > kernel from
> > the clang branch using `make kernel INSTKERNNAME=clang` and booted
> > from it.
> > i'm now experiencing audio problems with mp3s and certain video
> > files.
> > playback is awfully slow and the audio output gets distorted
> > massively. `top`
> > however reports no high cpu load and `vmstat -i` doesn't report
> > anything
> > unusual either.

> > this problem doesn't occur with a regular gcc-kernel.

> > both kernels are running under a regular (gcc) world.

> > i thought it might be a problem with acpi, but disabling acpi
> > (hint.acpi.0.disabled=1) gives me a system freeze.

> I've heard about this problem but did not manage to reproduce that.

> can you try to bisect what file is being miscompiled? ie. compile
> half of the kernel with gcc and half with clang and bisect this
> way to a single file.

> we can work from there...

i've identified the problem to be somewhere in sys/dev/sound. i've removed
"device sound" and "device hda_snd" from my kernel config and
rebuild/reinstalled both kernels (gcc and clang). i then booted the clang
kernel and loaded various sound.ko and snd_hda.ko combination. here're the
results:

sound.ko (clang) snd_hda.ko (clang) => BROKEN
sound.ko (clang) snd_hda.ko (gcc)   => BROKEN
sound.ko (gcc) snd_hda.ko (gcc)     => OK
sound.ko (gcc) snd_hda.ko (clang)   => OK

i've attached a log documenting all clang warnings that get issued when
building sys/modules/sound.

in addition to those warnings i get a lot of these, but i guess they aren't
harmful:

clang: warning: argument unused during compilation: '-funroll-loops'
clang: warning: argument unused during compilation: '-finline-limit=8000'
clang: warning: argument unused during compilation: '--param
inline-unit-growth=100'
clang: warning: argument unused during compilation: '--param
large-function-growth=1000'
clang: warning: argument unused during compilation: '-mfpmath=387'
clang: warning: argument unused during compilation: '-fformat-extensions'
clang: warning: argument unused during compilation: '-funroll-loops'
clang: warning: argument unused during compilation: '-finline-limit=8000'
clang: warning: argument unused during compilation: '--param
inline-unit-growth=100'
clang: warning: argument unused during compilation: '--param
large-function-growth=1000'
clang: warning: argument unused during compilation: '-mfpmath=387'

-- 
Alexander Best
-------------- next part --------------
/usr/local/src/clangbsd/sys/modules/sound/sound/../../../dev/sound/pcm/feeder_rate.c:163:1: warning: initializing 'char const (*)[36]' discards qualifiers, expected 'void *' [-pedantic]
SYSCTL_STRING(_hw_snd, OID_AUTO, feeder_rate_presets, CTLFLAG_RD,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/src/clangbsd/sys/modules/sound/sound/../../../dev/sound/pcm/feeder_rate.c:55:
In file included from @/dev/sound/pcm/sound.h:67:
@/sys/sysctl.h:243:2: note: instantiated from:
        SYSCTL_OID(parent, nbr, name, CTLTYPE_STRING|(access), \
        ^
/usr/local/src/clangbsd/sys/modules/sound/sound/../../../dev/sound/pcm/feeder_rate.c:163:1: note: instantiated from:
SYSCTL_STRING(_hw_snd, OID_AUTO, feeder_rate_presets, CTLFLAG_RD,
^
/usr/local/src/clangbsd/sys/modules/sound/sound/../../../dev/sound/pcm/feeder_rate.c:164:5: note: instantiated from:
    &feeder_rate_presets, 0, "compile-time rate presets");
    ^~~~~~~~~~~~~~~~~~~~
1 diagnostic generated.
/usr/local/src/clangbsd/sys/modules/sound/sound/../../../dev/sound/pcm/feeder_eq.c:97:1: warning: initializing 'char const (*)[74]' discards qualifiers, expected 'void *' [-pedantic]
SYSCTL_STRING(_hw_snd, OID_AUTO, feeder_eq_presets, CTLFLAG_RD,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/src/clangbsd/sys/modules/sound/sound/../../../dev/sound/pcm/feeder_eq.c:40:
In file included from @/dev/sound/pcm/sound.h:67:
@/sys/sysctl.h:243:2: note: instantiated from:
        SYSCTL_OID(parent, nbr, name, CTLTYPE_STRING|(access), \
        ^
/usr/local/src/clangbsd/sys/modules/sound/sound/../../../dev/sound/pcm/feeder_eq.c:97:1: note: instantiated from:
SYSCTL_STRING(_hw_snd, OID_AUTO, feeder_eq_presets, CTLFLAG_RD,
^
/usr/local/src/clangbsd/sys/modules/sound/sound/../../../dev/sound/pcm/feeder_eq.c:98:5: note: instantiated from:
    &feeder_eq_presets, 0, "compile-time eq presets");
    ^~~~~~~~~~~~~~~~~~
1 diagnostic generated.
/usr/local/src/clangbsd/sys/modules/sound/sound/../../../dev/sound/pcm/sound.c:73:1: warning: initializing 'char const (*)[17]' discards qualifiers, expected 'void *' [-pedantic]
SYSCTL_STRING(_hw_snd, OID_AUTO, version, CTLFLAG_RD, &snd_driver_version,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/src/clangbsd/sys/modules/sound/sound/../../../dev/sound/pcm/sound.c:34:
In file included from @/dev/sound/pcm/sound.h:67:
@/sys/sysctl.h:243:2: note: instantiated from:
        SYSCTL_OID(parent, nbr, name, CTLTYPE_STRING|(access), \
        ^
/usr/local/src/clangbsd/sys/modules/sound/sound/../../../dev/sound/pcm/sound.c:73:1: note: instantiated from:
SYSCTL_STRING(_hw_snd, OID_AUTO, version, CTLFLAG_RD, &snd_driver_version,
^                                                     ~~~~~~~~~~~~~~~~~~~
/usr/local/src/clangbsd/sys/modules/sound/sound/../../../dev/sound/pcm/sound.c:73:55: note: instantiated from:
SYSCTL_STRING(_hw_snd, OID_AUTO, version, CTLFLAG_RD, &snd_driver_version,
                                                      ^~~~~~~~~~~~~~~~~~~
/usr/local/src/clangbsd/sys/modules/sound/sound/../../../dev/sound/pcm/sound.c:85:19: warning: invalid conversion specifier 'b' [-Wformat]
        SNDSTAT_PREPARE_PCM_END();
        ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/src/clangbsd/sys/modules/sound/sound/../../../dev/sound/pcm/sound.c:38:
@/dev/sound/pcm/sndstat.h:69:34: note: instantiated from:
        sbuf_printf(s, "snddev flags=0x%b", d->flags, SD_F_BITS);       \
                        ~~~~~~~~~~~~~~~~^
/usr/local/src/clangbsd/sys/modules/sound/sound/../../../dev/sound/pcm/sound.c:85:2: warning: data argument not used by format string [-Wformat-extra-args]
        SNDSTAT_PREPARE_PCM_END();
        ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/src/clangbsd/sys/modules/sound/sound/../../../dev/sound/pcm/sound.c:38:
@/dev/sound/pcm/sndstat.h:69:48: note: instantiated from:
        sbuf_printf(s, "snddev flags=0x%b", d->flags, SD_F_BITS);       \
                       ~~~~~~~~~~~~~~~~~~~            ^
In file included from /usr/local/src/clangbsd/sys/modules/sound/sound/../../../dev/sound/pcm/sound.c:34:
@/dev/sound/pcm/sound.h:167:20: note: instantiated from:
#define SD_F_BITS               "\020"                                  \
                                ^
/usr/local/src/clangbsd/sys/modules/sound/sound/../../../dev/sound/pcm/sound.c:85:20: warning: invalid conversion specifier 'b' [-Wformat]
        SNDSTAT_PREPARE_PCM_END();
        ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/src/clangbsd/sys/modules/sound/sound/../../../dev/sound/pcm/sound.c:38:
@/dev/sound/pcm/sndstat.h:125:36: note: instantiated from:
                sbuf_printf(s, "channel flags=0x%b", c->flags,          \
                                ~~~~~~~~~~~~~~~~~^
/usr/local/src/clangbsd/sys/modules/sound/sound/../../../dev/sound/pcm/sound.c:85:2: warning: data argument not used by format string [-Wformat-extra-args]
        SNDSTAT_PREPARE_PCM_END();
        ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/src/clangbsd/sys/modules/sound/sound/../../../dev/sound/pcm/sound.c:38:
@/dev/sound/pcm/sndstat.h:126:7: note: instantiated from:
                    CHN_F_BITS);                                        \
                    ^
In file included from /usr/local/src/clangbsd/sys/modules/sound/sound/../../../dev/sound/pcm/sound.c:34:
In file included from @/dev/sound/pcm/sound.h:88:
@/dev/sound/pcm/channel.h:373:21: note: instantiated from:
#define CHN_F_BITS              "\020"                                  \
                                ^
5 diagnostics generated.


More information about the freebsd-current mailing list