zsh-workers
 help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Peter Stephenson <p.stephenson@samsung.com>
Cc: Bart Schaefer <schaefer@brasslantern.com>,
	Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: Cores almost on demand in patcompile()
Date: Wed, 19 Oct 2016 13:14:47 +0200	[thread overview]
Message-ID: <CAKc7PVDcPxsm-kn4ReHybLAbCnk+0FrKP18Qp6s76jOf4trBew@mail.gmail.com> (raw)
In-Reply-To: <20161013104321.29159e3f@pwslap01u.europe.root.pri>

[-- Attachment #1: Type: text/plain, Size: 2250 bytes --]

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:
��m�AglogBA0A/Diff/A/Users/sgniazdowski/github/zsh-navigation-tools.gitA0a87c8044c1c6677a38ccdabd36334cc2aaab496BF"znt-tmux.zsh
 � 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.

dbg_metacharinc_detecting_meta.gif
dbg_metacharinc_finishing.gif

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


dbg_patadd_1_length.gif
dbg_patadd_2_string.gif

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


dbg_patadd_nmeta.gif

An action is taken, metas counted again.


dbg_patcompiece_detecting_meta.gif

patcomppiece() correctly detects meta characters


dbg_patoptail_value_unavailable_1.gif
dbg_patoptail_value_unavailable_2.gif

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

Best regards,
Sebastian Gniazdowski

[-- Attachment #2: dbg_metacharinc_detecting_meta.gif --]
[-- Type: image/gif, Size: 67569 bytes --]

[-- Attachment #3: dbg_metacharinc_finishing.gif --]
[-- Type: image/gif, Size: 32347 bytes --]

[-- Attachment #4: dbg_patadd_1_length.gif --]
[-- Type: image/gif, Size: 75139 bytes --]

[-- Attachment #5: dbg_patadd_2_string.gif --]
[-- Type: image/gif, Size: 109192 bytes --]

[-- Attachment #6: dbg_patadd_nmeta.gif --]
[-- Type: image/gif, Size: 54553 bytes --]

[-- Attachment #7: dbg_patcompiece_detecting_meta.gif --]
[-- Type: image/gif, Size: 92386 bytes --]

[-- Attachment #8: dbg_patoptail_value_unavailable_1.gif --]
[-- Type: image/gif, Size: 97764 bytes --]

[-- Attachment #9: dbg_patoptail_value_unavailable_2.gif --]
[-- Type: image/gif, Size: 51170 bytes --]

  reply	other threads:[~2016-10-22  3:29 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-09  9:00 Sebastian Gniazdowski
2016-10-09  9:16 ` Sebastian Gniazdowski
2016-10-09 10:15   ` Sebastian Gniazdowski
2016-10-09 16:09     ` Sebastian Gniazdowski
2016-10-10 15:31       ` Sebastian Gniazdowski
2016-10-11  2:46         ` Bart Schaefer
2016-10-11  2:53           ` Bart Schaefer
2016-10-11  6:51           ` type-checking for metafiedness? (was: Re: Cores almost on demand in patcompile()) Daniel Shahaf
2016-10-13 10:22             ` Peter Stephenson
2016-10-13 13:46               ` Bart Schaefer
2016-10-14  6:36                 ` Daniel Shahaf
2016-10-14 16:53                   ` Peter Stephenson
2016-10-14 17:28                     ` Bart Schaefer
2016-10-14 20:08                     ` Daniel Shahaf
2016-10-14 23:04                   ` Oliver Kiddle
2016-10-15  8:30                     ` Daniel Shahaf
     [not found]                       ` <CAH+w=7bONQfKge=kWwFasKNXSu7510d8c+1aoYEeyUbozf_P7A@mail.gmail.com>
2016-10-15 18:35                         ` Fwd: " Bart Schaefer
2016-10-13  9:43           ` Cores almost on demand in patcompile() Peter Stephenson
2016-10-19 11:14             ` Sebastian Gniazdowski [this message]
2016-10-19 13:14               ` Peter Stephenson
     [not found]                 ` <CAKc7PVBhHFUWbMobAeDptgXmZ=S6RVsuNB7Qwsq555Srya_5qg@mail.gmail.com>
2016-10-20  8:56                   ` Bart Schaefer
2016-10-20  9:32                   ` Peter Stephenson
2016-10-20  9:56                     ` Sebastian Gniazdowski
2016-10-20 10:18                       ` Peter Stephenson
2016-10-20 10:30                         ` Sebastian Gniazdowski
2016-10-20 10:42                           ` Peter Stephenson
2016-10-20 10:56                             ` Peter Stephenson
2016-10-20 11:03                               ` Peter Stephenson
2016-10-20 11:09                                 ` Sebastian Gniazdowski
2016-10-20 11:23                                   ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKc7PVDcPxsm-kn4ReHybLAbCnk+0FrKP18Qp6s76jOf4trBew@mail.gmail.com \
    --to=sgniazdowski@gmail.com \
    --cc=p.stephenson@samsung.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).