[Pkg-libburnia-devel] Bug#746254: xorriso: Sigbus on sparc when generating iso file.

Thomas Schmitt scdbackup at gmx.net
Mon Apr 28 16:09:40 UTC 2014


sorry, i sent the first copy of this to the predecessor bug 731806.

> Program received signal SIGBUS, Bus error.
> add_worker (w_type=3, d=0x161128 <drive_array>, f=0xd1b20 <write_disc_worker_fun
> 149             a->u = *(union w_list_data *)data;

Other than expected from the first report in bug 731806,
the problem does not sit in libisofs but in libburn/async.c.
(Other predecessor developers to blame, if not myself.)

"a" is of type (struct w_list *). Its memory is created by calloc().
"data" is the address of a local variable struct (i.e. on stack).

struct w_list{
        /* ts A80714 */
        int w_type; /* see above define Burnworker_type_* */

        struct burn_drive *drive;
        pthread_t thread;

        struct w_list *next;

        union w_list_data
                struct scan_opts scan;
                struct erase_opts erase;
                struct format_opts format;
                struct write_opts write;
                struct fifo_opts fifo;
        } u;

Callers of dd_worker use locally declared structs:
        struct scan_opts o;
        struct erase_opts o;
        struct format_opts o;
        struct write_opts o;
        struct fifo_opts o;
by handing over over their address like:
        add_worker(..., &o);

        a->u = *(union w_list_data *)data;
would be equivalent to
        memcpy(&(a->u), &o, sizeof(union w_list_data));

Hard to imagine what could cause an alignment problem here.
Well, maybe it suffices to replace the assignment by memcpy().

I'll make experiments with the login account provided by
Sébastien Bernard. First i need to reproduce the crash.

Have a nice day :)


More information about the Pkg-libburnia-devel mailing list