Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Cores almost on demand in patcompile()

Maybe my inexperienced point of view will help? Typical pscan, next values are:

====== BEGIN ====== exp: zplugin�saved�visual�line�mode
pscan: 0x7fd9b425d820, next: 0xffffffe700000000
AFTER pscan: 0x7fd9b425d820, next: 0x7fd9b425d850
pscan: 0x7fd9b425d850, next: 0x7fd9b425d850
AFTER pscan: 0x7fd9b425d850, next: 0x0

When core is triggered, this looks like:

====== BEGIN ====== exp:
 � initial commit of skylite21 submission"Y
pscan: 0x7f9bb3d075e0, next: 0x10886db73
AFTER pscan: 0x7f9bb3d075e0, next: 0x7f9bb3d07698
pscan: 0x7f9bb3d07698, next: 0x7f9bb3d07698
AFTER pscan: 0x7f9bb3d07698, next: 0xff9bb3d07698
pscan: 0xff9bb3d07698, next: 0xff9bb3d07698

Cannot print last "next" from debugger, inaccessible memory. What can
be seen here? First next value seems to be weird in both cases. Either
0xffffff at the beginning, or low value 0x10886db73 (low when compared
to pscan's value). Then, AFTER message shows the weird value is fixed.
First log says there should be 0x0 after successful processing. In
second log it is seen that instead of 0x0 another weird value is
assigned to "next" – it starts with 0xff. I did many runs and it was
always that the odd value appeared before core.

I also did step by step walk through patcompile(). Unluckily it wasn't
a core-triggering dump (next ended with 0x0). I attach screenshots
with some crucial places.


Traversing the string METACHARINC() is called. It rather correctly
detects special characters and skips them, as shown.


Pattern is being added, it's length is visible, number of meta
characters, also P_LS_STR result.


An action is taken, metas counted again.


patcomppiece() correctly detects meta characters


Detected some incorrect pointers, however I might misunderstand what ptr is.

Best regards,
Sebastian Gniazdowski

Attachment: dbg_metacharinc_detecting_meta.gif
Description: GIF image

Attachment: dbg_metacharinc_finishing.gif
Description: GIF image

Attachment: dbg_patadd_1_length.gif
Description: GIF image

Attachment: dbg_patadd_2_string.gif
Description: GIF image

Attachment: dbg_patadd_nmeta.gif
Description: GIF image

Attachment: dbg_patcompiece_detecting_meta.gif
Description: GIF image

Attachment: dbg_patoptail_value_unavailable_1.gif
Description: GIF image

Attachment: dbg_patoptail_value_unavailable_2.gif
Description: GIF image

Messages sorted by: Reverse Date, Date, Thread, Author