But we actually have 2 entries.
It should not break.

(gdb) p args
$32 = {_vptr.NCVector = 0xfffff7f8a020 <vtable for 
OpenSP::NCVector<OpenSP::Owner<OpenJade_DSSSL::Expression> >+16>, size_ = 2, 
ptr_ = 0xaaaaab46eae0, alloc_ = 2}
(gdb) p *(args.ptr_+0)$33 = {_vptr.Owner = 0xfffff7f8a040 <vtable for 
OpenSP::Owner<OpenJade_DSSSL::Expression>+16>, p_ = 0xaaaaab46f9f0}
(gdb) p *(args.ptr_+1)
$34 = {_vptr.Owner = 0xfffff7f8a040 <vtable for 
OpenSP::Owner<OpenJade_DSSSL::Expression>+16>, p_ = 0x0}
(gdb) p *(args.ptr_+2)
$35 = {_vptr.Owner = 0x6c00000063, p_ = 0x1d1}

So resize should be called with argument n=1
  1004                args.resize(args.size() - 1);
(gdb) p args.size()
$36 = 2

But instead:
#0  OpenSP::NCVector<OpenSP::Owner<OpenJade_DSSSL::Expression> >::resize 
(this=0xffffffffe0c8, n=2) at /usr/include/OpenSP/Vector.h:27

That makes the pointer calculation go too far as +2 is outside the
vector.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1869734

Title:
  openjade segfaults on arm (due to gcc optimization)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openjade/+bug/1869734/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to