Dwarves Archive on lore.kernel.org
 help / color / Atom feed
From: David Beaulieu <david.beaulieu-UF6BFNFdnjXQT0dZR+AlfA@public.gmane.org>
To: dwarves-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: 16-bit id's in cu_for_each loops cause infinite loops with large libraries
Date: Mon, 18 Jul 2016 18:13:23 +0000 (UTC)
Message-ID: <loom.20160718T200805-633@post.gmane.org> (raw)


I'm new to pahole (great tool!)... I downloaded the latest git source 
(b52386d041fac2dc6decf3a9e8e85385784a2de9) and tried to run it against a 
large library from my project. It got caught in an infinite loop in 
cu__find_base_type_by_sname_and_size() in the call to cu__for_each_type(). 
The reason was the uint16_t id was not big enough... it wraps around and 
is always less than cu->types_table.nr_entries. I changed it (and other 
instances of it in dwarves.c) to uint32_t, and that seems to have fixed 
the issue, but I don't know if there are any other side effects.

Anyway, hope this helps!

To unsubscribe from this list: send the line "unsubscribe dwarves" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

                 reply index

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

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

  git send-email \
    --in-reply-to=loom.20160718T200805-633@post.gmane.org \
    --to=david.beaulieu-uf6bfnfdnjxqt0dzr+alfa@public.gmane.org \
    --cc=dwarves-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Dwarves Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dwarves/0 dwarves/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dwarves dwarves/ https://lore.kernel.org/dwarves \
	public-inbox-index dwarves

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git