On 25.01.12 01:40, Hiroki Sato wrote:
Andreas Tobler<andre...@freebsd.org>  wrote
   in<4f1f3585.8060...@freebsd.org>:

an>  Hi Eitan,
an>
an>  On 20.01.12 02:38, Eitan Adler wrote:
an>  >  Author: eadler
an>  >  Date: Fri Jan 20 01:38:21 2012
an>  >  New Revision: 230353
an>  >  URL: http://svn.freebsd.org/changeset/base/230353
an>  >
an>  >  Log:
an>  >     Fix warning when compiling with gcc46:
an>  >             error: variable 'temp' set but not used
an>  >
an>  >     Approved by:   dim
an>  >     Approved by: cperciva (mentor, blanket for pre-mentorship
an>  >     already-approved commits)
an>  >     MFC after:     3 days
an>
an>  I do not know which of the makefs commits it was:
an>
an>  [andreast@neon] /export/home/andreast/>  makefs -t cd9660 -o chrp-boot
an>  -o rockridge -o label=pseries -B4321 p.iso /data1/netboot/powerpc64/
an>  Segmentation fault (core dumped)
an>
an>  [neon:~] andreast% uname -ra
an>  FreeBSD neon.andreas.nets 10.0-CURRENT FreeBSD 10.0-CURRENT #11
an>  r230469M: Mon Jan 23 02:53:05 CET 2012
an>  andre...@neon.andreas.nets:/usr/obj/export/devel/fbsd/head/src/sys/NEON
an>  amd64
an>
an>  Reverting to 230352 lets me create an iso.
an>
an>  I compile makefs with the base compiler.
an>
an>  I'll do some more investigations tomorrow, late night here.

  I got the same symptom and am investigating it.  Can you rebuild the
  binary with a debug option like this:

  % cd /usr/src/usr.sbin/makefs
  % make clean
  % make DEBUG_FLAGS=-g
  % make DEBUG_FLAGS=-g install

  and then send me the output of the following command?

  % printf "run -t cd9660 -o chrp-boot -o rockridge -o label=pseries -B4321 p.iso 
/data1/netboot/powerpc64/\nbt\nf 1\n f 2\n" | gdb -x /dev/stdin -batch 
/usr/sbin/makefs

  In my environment both the old and the new version could reproduce
  it.  I am not sure if mine is the same as yours at this moment,
  though.

It is actually r230354, this is the commit which shows the failure.
And I reverted back to 230353 and onfirmed that it 'works'.

I additionally built with -O0 -g, see below.

If you need more details, I'll be out the next 15h but later on I can continue.

Thank you very much!
Andreas

Here the output from the binary built with "-g":
------
[andreast@tcx58] /export/home/andreast/> printf "run -t cd9660 -o chrp-boot -o rockridge -o label=pseries -B4321 p.iso /export/netboot/powerpc64/\nbt\nf 1\n f 2\n" | gdb -x /dev/stdin -batch /usr/sbin/makefs

Program received signal SIGSEGV, Segmentation fault.
0x0000000800b781d6 in memcpy () from /lib/libc.so.7
#0  0x0000000800b781d6 in memcpy () from /lib/libc.so.7
#1  0x00000000004045f8 in cd9660_rename_filename (iter=0x0, num=36,
    delete_chars=2) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1120
#2  0x00000000004044bb in cd9660_handle_collisions (colliding=0x801ba9ec0,
    past=35) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1042
#3  0x0000000000404f13 in cd9660_convert_structure (root=0x8013929c0,
    parent_node=0x801ba9ec0, level=5, numDirectories=0x7fffffffd864,
    error=0x7fffffffd860)
    at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1462
#4  0x0000000000404e42 in cd9660_convert_structure (root=0x801378e70,
    parent_node=0x801b894c0, level=4, numDirectories=0x7fffffffd864,
    error=0x7fffffffd860)
    at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1419
#5  0x0000000000404e42 in cd9660_convert_structure (root=0x80123fa60,
    parent_node=0x8016f2280, level=3, numDirectories=0x7fffffffd864,
    error=0x7fffffffd860)
    at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1419
#6  0x0000000000404e42 in cd9660_convert_structure (root=0x80110cec0,
    parent_node=0x801552100, level=2, numDirectories=0x7fffffffd864,
    error=0x7fffffffd860)
---Type <return> to continue, or q <return> to quit--- at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1419
#7  0x0000000000404e42 in cd9660_convert_structure (root=0x80104c0b0,
    parent_node=0x801007140, level=1, numDirectories=0x7fffffffd864,
    error=0x7fffffffd860)
    at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1419
#8  0x00000000004036f1 in cd9660_makefs (image=0x7fffffffdd45 "p.iso",
    dir=0x7fffffffdd4b "/export/netboot/powerpc64/", root=0x80104c060,
    fsopts=0x7fffffffd920)
    at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:505
#9  0x000000000040bb58 in main (argc=2, argv=0x7fffffffda90)
    at /export/devel/fbsd/src/usr.sbin/makefs/makefs.c:291
#1  0x00000000004045f8 in cd9660_rename_filename (iter=0x0, num=36,
    delete_chars=2) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1120
1120                    memcpy(tmp, (iter->o_name), numbts);
#2  0x00000000004044bb in cd9660_handle_collisions (colliding=0x801ba9ec0,
    past=35) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1042
1042                    iter = cd9660_rename_filename(iter, skip, delete_chars);
------

And here the output from a bt full with a binary built with "-g -O0":
------
[andreast@tcx58] /export/home/andreast/> printf "run -t cd9660 -o chrp-boot -o rockridge -o label=pseries -B4321 p.iso /export/netboot/powerpc64/\nbt full\nf 1\n f 2\n" | gdb -x /dev/stdin -batch /usr/sbin/makefs

Program received signal SIGSEGV, Segmentation fault.
0x0000000800b781d6 in memcpy () from /lib/libc.so.7
#0  0x0000000800b781d6 in memcpy () from /lib/libc.so.7
No symbol table info available.
#1  0x00000000004045f8 in cd9660_rename_filename (iter=0x0, num=36,
    delete_chars=2) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1120
        i = 35
        numbts = 27
        digit = 4
        digits = 2
        temp = 0
        powers = 10
        count = 31
        naming = 0x93 <Error reading address 0x93: Bad address>
        maxlength = 31
        tmp = 0x80104b040 "ZULU.;1"
#2  0x00000000004044bb in cd9660_handle_collisions (colliding=0x801ba9ec0,
    past=35) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1042
        iter = (cd9660node *) 0x801bab140
        next = (cd9660node *) 0x0
        prev = (cd9660node *) 0x0
        skip = 36
---Type <return> to continue, or q <return> to quit---      delete_chars = 2
        temp_past = 0
        temp_skip = 0
        flag = 1
        end_of_range = (cd9660node *) 0x801bad6c0
#3  0x0000000000404f13 in cd9660_convert_structure (root=0x8013929c0,
    parent_node=0x801ba9ec0, level=5, numDirectories=0x7fffffffd864,
    error=0x7fffffffd860)
    at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1462
        iterator = (fsnode *) 0x0
        this_node = (cd9660node *) 0x801badbc0
        working_level = 8
        add = 1
        flag = 1
        counter = 35
        __func__ = "cd9660_convert_structure"
#4  0x0000000000404e42 in cd9660_convert_structure (root=0x801378e70,
    parent_node=0x801b894c0, level=4, numDirectories=0x7fffffffd864,
    error=0x7fffffffd860)
    at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1419
        iterator = (fsnode *) 0x801392920
        this_node = (cd9660node *) 0x801ba9ec0
        working_level = 5
---Type <return> to continue, or q <return> to quit---      add = 1
        flag = 0
        counter = 0
        __func__ = "cd9660_convert_structure"
#5  0x0000000000404e42 in cd9660_convert_structure (root=0x80123fa60,
    parent_node=0x8016f2280, level=3, numDirectories=0x7fffffffd864,
    error=0x7fffffffd860)
    at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1419
        iterator = (fsnode *) 0x801378dd0
        this_node = (cd9660node *) 0x801b894c0
        working_level = 4
        add = 1
        flag = 0
        counter = 0
        __func__ = "cd9660_convert_structure"
#6  0x0000000000404e42 in cd9660_convert_structure (root=0x80110cec0,
    parent_node=0x801552100, level=2, numDirectories=0x7fffffffd864,
    error=0x7fffffffd860)
    at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1419
        iterator = (fsnode *) 0x80123f9c0
        this_node = (cd9660node *) 0x8016f2280
        working_level = 3
        add = 1
---Type <return> to continue, or q <return> to quit---      flag = 0
        counter = 0
        __func__ = "cd9660_convert_structure"
#7  0x0000000000404e42 in cd9660_convert_structure (root=0x80104c0b0,
    parent_node=0x801007140, level=1, numDirectories=0x7fffffffd864,
    error=0x7fffffffd860)
    at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1419
        iterator = (fsnode *) 0x80110ce20
        this_node = (cd9660node *) 0x801552100
        working_level = 2
        add = 1
        flag = 0
        counter = 0
        __func__ = "cd9660_convert_structure"
#8  0x00000000004036f1 in cd9660_makefs (image=0x7fffffffdd45 "p.iso",
    dir=0x7fffffffdd4b "/export/netboot/powerpc64/", root=0x80104c060,
    fsopts=0x7fffffffd920)
    at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:505
        startoffset = 518
        numDirectories = 886
        pathTableSectors = 140737488345752
        firstAvailableSector = 45
        totalSpace = 140737488346437
---Type <return> to continue, or q <return> to quit---      error = 0
        real_root = (cd9660node *) 0x801007140
        __func__ = "cd9660_makefs"
#9  0x000000000040bb58 in main (argc=2, argv=0x7fffffffda90)
    at /export/devel/fbsd/src/usr.sbin/makefs/makefs.c:291
        sb = {st_dev = 112, st_ino = 2652161, st_mode = 16877, st_nlink = 17,
st_uid = 0, st_gid = 0, st_rdev = 10608649, st_atim = {tv_sec = 1327469459,
    tv_nsec = 0}, st_mtim = {tv_sec = 1327223440, tv_nsec = 0}, st_ctim = {
    tv_sec = 1327223440, tv_nsec = 0}, st_size = 512, st_blocks = 8,
  st_blksize = 32768, st_flags = 0, st_gen = 2653886287, st_lspare = 0,
  st_birthtim = {tv_sec = 1324800403, tv_nsec = 0}}
        start = {tv_sec = 1327469680, tv_usec = 454035}
        fstype = (fstype_t *) 0x627c28
        fsoptions = {size = 0, inodes = 0, curinode = 0, fd = -1,
  superblock = 0x0, onlyspec = 0, minsize = 0, maxsize = 0, freefiles = 0,
  freefilepc = 0, freeblocks = 0, freeblockpc = 0, needswap = 1,
  sectorsize = -1, fs_specific = 0x0}
        root = (fsnode *) 0x80104c060
        ch = -1
        len = 4203022
        subtree = 0x7fffffffdd4b "/export/netboot/powerpc64/"
        specfile = 0x0
#1  0x00000000004045f8 in cd9660_rename_filename (iter=0x0, num=36,
---Type <return> to continue, or q <return> to quit--- delete_chars=2) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1120
1120                    memcpy(tmp, (iter->o_name), numbts);
#2  0x00000000004044bb in cd9660_handle_collisions (colliding=0x801ba9ec0,
    past=35) at /export/devel/fbsd/src/usr.sbin/makefs/cd9660.c:1042
1042                    iter = cd9660_rename_filename(iter, skip, delete_chars);

-----

_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to