[MPlayer-cvslog] r22298 - in trunk: Makefile command.c command.h m_property.c m_property.h mp_core.h mplayer.c

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Thu Feb 22 18:29:36 CET 2007


Hello,
On Thu, Feb 22, 2007 at 06:52:54PM +0200, Uoti Urpala wrote:
> On Thu, 2007-02-22 at 15:40 +0100, Reimar Döffinger wrote:
> > On Wed, Feb 21, 2007 at 01:49:25AM +0100, uau wrote:
> > > +static MPContext *mpctx = &(MPContext){
> > > +    .osd_function = OSD_PLAY,
> > > +    .begin_skip = MP_NOPTS_VALUE,
> > > +    .play_tree_step = 1,
> > > +    .global_sub_pos = -1,
> > > +    .set_of_sub_pos = -1,
> > > +    .file_format = DEMUXER_TYPE_UNKNOWN,
> > > +    .last_dvb_step = 1,
> > > +};
> > 
> > Can someone enlighten me on the specifics of this constructs?
> > Esp. if it is valid for the compiler to place this into .rodata or
> > similar, because this is what valgrind gives on my 32 bit system:
> > 
> > ==8315== Process terminating with default action of signal 11 (SIGSEGV)
> > ==8315==  Bad permissions for mapped region at address 0x85C5898
> > ==8315==    at 0x807FDD8: main (mplayer.c:2233)
> 
> No that is not valid. Looks like it was miscompiled. The C99 standard
> says (part 6.5.2.5) "String literals, and compound literals with
> const-qualified types, need not designate dintinct objects". There is
> nothing const-qualified about that.

Huh? If there is nothing const-qualified about this, the cited part does
not say anything at all about this case...
Also I'd avoid C99 dependencies if avoidable...
And yes, I probably should just read that stuff myself.

Greetings,
Reimar Döffinger



More information about the MPlayer-cvslog mailing list