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

Uoti Urpala uoti.urpala at pp1.inet.fi
Thu Feb 22 17:52:54 CET 2007


On Thu, 2007-02-22 at 15:40 +0100, Reimar Döffinger wrote:
> Hello,
> 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.




More information about the MPlayer-cvslog mailing list