Operating System - HP-UX
1745857 Members
4635 Online
108723 Solutions
New Discussion

Re: Signal 10, Bus error - BUS_ADRALN (bad deque iterator)

 
Dennis Handly
Acclaimed Contributor

Re: Signal 10, Bus error - BUS_ADRALN (bad deque iterator)

0x6000000003102870:     0x600000000031d540      0x600000000031d540
0x6000000003102880:     0x600000000031d590      0x600000000031b6f0

 

This is the iterator begin.  The first word is the pointer to the element and it is aligned.

 

0x6000000003102890:     0x600000000031d590      0x600000000031d540
0x60000000031028a0:     0x600000000031d590      0x600000000031b6f0

 

This is the iterator end.  The first word is the pointer past the end.

 

0x60000000031028b0:     0x0000000000000001      0x600000000031b6f0  0x0000000000000001

 

The only thing "odd" about this, is that there is only room for the one element, of 80 bytes.

(This would only happen if container allocation policies were fiddled with.)

 

>The first element that we retrieve from deque itself is corrupted. Ie deque::begin() returns something invalid.

 

I'm not sure how?  It only needs to copy the 4 pointers out of the control block.

 

>what is debug info?

When you compile with -g, the compiler generates debug info.
Dennis Handly
Acclaimed Contributor

Re: Signal 10, Bus error - BUS_ADRALN (bad deque iterator)

>I'm not sure how?  It only needs to copy the 4 pointers out of the control block.

 

The register values indicate that r33 was changed.  This could happen if it was changed somewhere in the for-loop below the disassembly.  This means it aborted on the second or following trip.

So can you print out the current iterator value?

 

You could have blasted it by a buffer overrun.