[asterisk-bugs] [Asterisk 0018707]: Casting alignment problem in send_client causes bad seq to be generated on ARM platform

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Jan 28 22:13:33 CST 2011


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18707 
====================================================================== 
Reported By:                jjoshua
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   18707
Category:                   Channels/chan_unistim
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Asterisk Version:           Older 1.6.2 - please test a newer version 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): 1.6.2 
SVN Revision (number only!): 249895 
Request Review:              
====================================================================== 
Date Submitted:             2011-01-28 22:10 CST
Last Modified:              2011-01-28 22:13 CST
====================================================================== 
Summary:                    Casting alignment problem in send_client causes bad
seq to be generated on ARM platform
Description: 
In send_client(), a char array is cast as a short array.  If the char array
starts on an odd byte, the short array cast will not be aligned properly
and setting the seq into the array will not be the expected result.

This happens on the ARM platform.
====================================================================== 

---------------------------------------------------------------------- 
 (0131195) jjoshua (reporter) - 2011-01-28 22:13
 https://issues.asterisk.org/view.php?id=18707#c131195 
---------------------------------------------------------------------- 
The problem manifests itself when you lift the handset of the phone.

Request received
Handset off hook
Sending select output packet output=c0 volume=1 mute=0
Sending led_update (18)
Sending favorite pos 0 with status 0x24
Sending led_update (8)
Sending led_update (10)
Sending select output packet output=c0 volume=1 mute=0
Sending led_update (18)
Sending favorite pos 0 with status 0x24
Sending led_update (8)
Sending led_update (10)
Sending select output packet output=c0 volume=1 mute=0
Sending led_update (18)
Sending favorite pos 0 with status 0x24
Sending led_update (8)
Sending led_update (10)
No country defined, using US tone
Sending Stream Based Tone Frequency Component List Download 350 440
Sending Stream Based Tone On
Sending text at pos 0, inverse flag 5
Sending text at pos 32, inverse flag 5
Sending status text
Sending text at pos 64, inverse flag 5
Sending set blink
Sending set cursor position
Sending favorite pos 0 with status 0x2a
Sending icon pos 0 with status 0x00
Sending led_update (0)
Retransmit slot https://issues.asterisk.org/view.php?id=24 (seq=#0x3ebb), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=25 (seq=#0x3fbb), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=26 (seq=#0x0040), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=27 (seq=#0x41bb), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=28 (seq=#0x42bb), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=24 (seq=#0x3ebb), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=25 (seq=#0x3fbb), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=26 (seq=#0x0040), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=27 (seq=#0x41bb), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=28 (seq=#0x42bb), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=24 (seq=#0x3ebb), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=25 (seq=#0x3fbb), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=26 (seq=#0x0040), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=27 (seq=#0x41bb), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=28 (seq=#0x42bb), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=24 (seq=#0x3ebb), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=25 (seq=#0x3fbb), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=26 (seq=#0x0040), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=27 (seq=#0x41bb), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=28 (seq=#0x42bb), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=24 (seq=#0x3ebb), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=25 (seq=#0x3fbb), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=26 (seq=#0x0040), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=27 (seq=#0x41bb), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=28 (seq=#0x42bb), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=24 (seq=#0x3ebb), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=25 (seq=#0x3fbb), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=26 (seq=#0x0040), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=27 (seq=#0x41bb), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=28 (seq=#0x42bb), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=24 (seq=#0x3ebb), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=25 (seq=#0x3fbb), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=26 (seq=#0x0040), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=27 (seq=#0x41bb), last
ack was #0x003d
Retransmit slot https://issues.asterisk.org/view.php?id=28 (seq=#0x42bb), last
ack was #0x003d
Too many retransmit - freeing client
close_client session 0x43a020 device 0x79b618 lines 0x79b8d8 sub 0x79b108
Trying to unregister extension '106' context 'default' 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-01-28 22:13 jjoshua        Note Added: 0131195                          
======================================================================




More information about the asterisk-bugs mailing list