Rockbox mail archive
Subject: Broken codecs in DEBUG build and compile flags fun
Broken codecs in DEBUG build and compile flags fun
guess what: DEBUG builds are broken! (again) This time, codecs are broken,
but you most likely didn't notice because decoders magically happen to
work. However try to record and booom.
The explanation and potential fix is to be found here:
it appears to be a mismatch in compile time flags between main firmware and
codec. For some reason, the codec makefile removes the DEBUG flags. I have
no idea why, it dates back from a loooong time ago, but if you know the
answer I'll be glad to hear it :) Otherwise I will commit this soon.
On the related topic, it yield the issue of mismatch between
codec when changing compile time flags like DEBUG, logf and profiling. The
problem is that the codec header doesn't record flags even if they change
the API structure. Since as I dev I frequently only update the main binary
to speed up dev, I regularly end up with horrible crashes that are not
obvious. It can also happen if you forget to make clean after you
reconfigure because some pieces of code are not rebuilt. I would like to
gather some opinion on this proposal:
What it does is simple: it adds a field to codec/plugin header that is a
bitmap of compile time flags that change the layout (and thus break ABI).
The code will refuse to load any codec with different set of flags. Note
that it is different from API version. If there are no objection, I plan to
commit this. I don't think it can have any bad impact for user and it can
only make plugin/codec safer.
Received on 2016-09-21
Page was last modified "Jan 10 2012" The Rockbox Crew