List for cgit developers and users
 help / color / mirror / Atom feed
From: bluewind at xinu.at (Florian Pritz)
Subject: Crash when using path limit in ui-patch.c
Date: Thu, 24 Nov 2016 10:57:22 +0100	[thread overview]
Message-ID: <08e7db12-42ae-87d6-4fbb-d1c87226f98b@xinu.at> (raw)

Hi,

I get the following backtrace when trying to use the path limit feature
while getting a patch.

> #0  0x0000000000467bb5 in prefix_pathspec (item=0x77ba48, p_short_magic=0x7fffffffb2e8, raw=0x76e488, flags=0, prefix=0x0, prefixlen=0, elt=0x3637353238343130 <error: Cannot access memory at address 0x3637353238343130>) at pathspec.c:149
> #1  0x0000000000468872 in parse_pathspec (pathspec=0x7fffffffc550, magic_mask=0, flags=0, prefix=0x0, argv=0x76e480) at pathspec.c:418
> #2  0x0000000000487efb in setup_revisions (argc=4, argv=0x7fffffffc430, revs=0x7fffffffc500, opt=0x0) at revision.c:2253
> #3  0x00000000004135eb in cgit_print_patch (new_rev=0x791670 "03c580a9b31fb82187de3c882bc274441c41847d", old_rev=0x0, prefix=0x76dfd0 "application/libraries") at ../ui-patch.c:88
> #4  0x0000000000409534 in patch_fn () at ../cmd.c:119
> #5  0x0000000000407281 in process_request () at ../cgit.c:744
> #6  0x0000000000408d2b in cache_process (size=0, path=0x4fc87a "/var/cache/cgit", key=0x777670 "users/flo/filebin/patch/application/libraries?id=03c580a9b31fb82187de3c882bc274441c41847d", ttl=-1, fn=0x407141 <process_request>) at ../cache.c:367
> #7  0x00000000004083aa in cmd_main (argc=1, argv=0x7fffffffe048) at ../cgit.c:1092
> #8  0x000000000041d40b in main (argc=1, argv=0x7fffffffe048) at common-main.c:40

I'm not exactly sure what is going on, but I don't have the time to
debug so I cobbled together a quick test case for this which you can
view here: https://paste.xinu.at/vgCm/

The test "works" before commit 5fe88a9c81517b1a8a93d930c738cbb6f71dec2a
since that introduces the feature and using the path limit doesn't
actually change the output. It's just a quick reproducer.

Florian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 825 bytes
Desc: OpenPGP digital signature
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20161124/fdd9f10f/attachment.asc>


             reply	other threads:[~2016-11-24  9:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-24  9:57 bluewind [this message]
2016-11-24 18:49 ` john
2016-11-24 19:14   ` lfleischer

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=08e7db12-42ae-87d6-4fbb-d1c87226f98b@xinu.at \
    --to=cgit@lists.zx2c4.com \
    /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.
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).