Subject: Re: bug#18699: 25.0.50; Windows 7: Odd length text property list

From: Eli Zaretskii <[email-masked]>
Date: Mon, 13 Oct 2014 08:31:44 +0300

> From: [email-masked] (Óscar Fuentes)
> Date: Mon, 13 Oct 2014 04:02:22 +0200
> 
> Backtrace:
> 
> #0  validate_plist (list=8577862) at ../../emacs/src/textprop.c:235
> #1  0x0114d240 in add_text_properties_1 (start=start@entry=4,
>     end=end@entry=48, properties=properties@entry=8577862,
>     object=object@entry=22450013,
>     set_type=set_type@entry=TEXT_PROPERTY_REPLACE)
>     at ../../emacs/src/textprop.c:1181
> #2  0x0114d607 in Fadd_text_properties (object=22450013, properties=8577862,
>     end=end@entry=48, start=4) at ../../emacs/src/textprop.c:1306
> #3  Fput_text_property (start=4, end=end@entry=48, property=21207346,
>     value=22318226, object=22450013) at ../../emacs/src/textprop.c:1324
> #4  0x01071e04 in produce_charset (coding=<optimized out>, pos=12,
>     charbuf=0x82e39c) at ../../emacs/src/coding.c:7285
> #5  produce_annotation (pos=12, coding=<optimized out>)
>     at ../../emacs/src/coding.c:7328
> #6  decode_coding (coding=coding@entry=0x82e5e0)
>     at ../../emacs/src/coding.c:7423
> #7  0x01076e6e in decode_coding_object (coding=<optimized out>,
>     coding@entry=0x82e5e0, src_object=<optimized out>,
>     src_object@entry=14478465, from=<optimized out>, from@entry=0,
>     from_byte=<optimized out>, from_byte@entry=0, to=<optimized out>,
>     to_byte=<optimized out>, dst_object=<optimized out>,
>     dst_object@entry=21139106) at ../../emacs/src/coding.c:8149
> #8  0x01078aea in code_convert_string (string=string@entry=14478465,
>     coding_system=<optimized out>, coding_system@entry=22318258,
>     dst_object=<optimized out>, encodep=encodep@entry=false,
>     nocopy=nocopy@entry=false, norecord=norecord@entry=true)
>     at ../../emacs/src/coding.c:9491
> #9  0x01078f09 in code_convert_string_norecord (string=14478465,
>     coding_system=coding_system@entry=22318258, encodep=encodep@entry=false)
>     at ../../emacs/src/coding.c:9511
> #10 0x01167840 in intern_font_name (
>     string=string@entry=0x82eb2c "Courier New")
>     at ../../emacs/src/w32font.c:289
> #11 0x01167ca7 in w32_enumfont_pattern_entity (frame=<optimized out>,
>     requested_font=0x82ecd4, backend=21295146, font_type=4,
>     physical_font=0x82e928, logical_font=0x82eb10)
>     at ../../emacs/src/w32font.c:1085
> #12 add_font_entity_to_list (logical_font=0x82eb10, physical_font=0x82e928,
>     font_type=4, lParam=8580308) at ../../emacs/src/w32font.c:1500
> #13 0x777004b5 in SetPixelV () from C:\Windows\system32\gdi32.dll
> #14 0x7770041e in SetPixelV () from C:\Windows\system32\gdi32.dll
> #15 0x777005db in GDI32!EnumFontFamiliesExA ()
>    from C:\Windows\system32\gdi32.dll
> #16 0x777005a8 in GDI32!EnumFontFamiliesExA ()
>    from C:\Windows\system32\gdi32.dll
> #17 0x011689a0 in w32font_list_internal (
>     f=f@entry=0x1810310 <dumped_data+4102736>,
>     font_spec=font_spec@entry=21240061, opentype_only=opentype_only@entry=1)
>     at ../../emacs/src/w32font.c:833

Looks exactly like #18559, but that one was fixed.

Which version of GCC did you use to build this binary?

The function add_font_entity_to_list is decorated with a GCC attribute
that should cause GCC to emit a few instructions in the function's
prologue to ensure the stack is 8-byte aligned.  Do you see that in the
disassembly of that function?  If not, can you show the preprocessed
source of the first few line of that function, including its
definition line?

In any case, please continue using the current trunk and reporting
results from it, not from the Oct 4 version.

Thanks.