Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 498690 - sys-apps/elfix: revdep-pax -r fails, dumps stacktrace
Summary: sys-apps/elfix: revdep-pax -r fails, dumps stacktrace
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-20 14:20 UTC by ViliusSutkus89
Modified: 2014-01-23 16:23 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
elfix-pep8 and more (elfix-pep8-cleanup.patch,24.85 KB, patch)
2014-01-20 14:54 UTC, Matthew Thode ( prometheanfire )
Details | Diff
pep8 (0001-updating-python-apps-for-pep8.patch,24.62 KB, patch)
2014-01-20 17:02 UTC, Matthew Thode ( prometheanfire )
Details | Diff
use before define (0002-fix-used-before-define-on-sv-s.patch,1.73 KB, patch)
2014-01-20 17:03 UTC, Matthew Thode ( prometheanfire )
Details | Diff
fixes use before define, now more streamlined with comments (0001-fix-used-before-define-on-sv-s.patch,1.99 KB, patch)
2014-01-23 16:16 UTC, Matthew Thode ( prometheanfire )
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ViliusSutkus89 2014-01-20 14:20:00 UTC
Steps to reproduce:
1. Extract stage3 20140116 hardened nomultilib
2. chroot
3. revdep-pax -r
4. 50% chance to fail hard with the following output:

sh-4.2# revdep-pax -r
Traceback (most recent call last):
  File "/usr/sbin/revdep-pax", line 654, in <module>
    main()
  File "/usr/sbin/revdep-pax", line 643, in main
    run_reverse(verbose, executable_only)
  File "/usr/sbin/revdep-pax", line 311, in run_reverse
    sv = '%s\n\t%s ( %s )' % (sv, elf, elf_str_flags)
UnboundLocalError: local variable 'sv' referenced before assignment


50%, because there's a random chance (based on unordered list order) that this bug will not be triggered.

Prometheanfire made a patch couple days ago, will upload.
Comment 1 Anthony Basile gentoo-dev 2014-01-20 14:33:48 UTC
Thanks for the catch!  I wonder what's changed because I must have run revdep-pax -r a million times and never hit that.
Comment 2 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2014-01-20 14:54:24 UTC
Created attachment 368244 [details, diff]
elfix-pep8 and more
Comment 3 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2014-01-20 17:02:46 UTC
Created attachment 368264 [details, diff]
pep8
Comment 4 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2014-01-20 17:03:07 UTC
Created attachment 368266 [details, diff]
use before define
Comment 5 Anthony Basile gentoo-dev 2014-01-20 22:49:36 UTC
(In reply to Matthew Thode ( prometheanfire ) from comment #3)
> Created attachment 368264 [details, diff] [details, diff]
> pep8

Applied

(In reply to Matthew Thode ( prometheanfire ) from comment #4)
> Created attachment 368266 [details, diff] [details, diff]
> use before define

This doesn't seem right.  It changes the logic.  Why does it give the same error reporting?
Comment 6 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2014-01-23 16:16:05 UTC
Created attachment 368566 [details, diff]
fixes use before define, now more streamlined with comments
Comment 7 Anthony Basile gentoo-dev 2014-01-23 16:23:48 UTC
Okay committed.