Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

control sequence improperly handled when split across reads #2448

Closed
dankamongmen opened this issue Dec 10, 2021 · 3 comments · Fixed by #2449
Closed

control sequence improperly handled when split across reads #2448

dankamongmen opened this issue Dec 10, 2021 · 3 comments · Fixed by #2449
Assignees
Labels
bug Something isn't working input readin' dem bytes
Milestone

Comments

@dankamongmen
Copy link
Owner

Work on #2435 led to a 4095B input event followed by 3192B. we had a control sequence split across the two reads:

process_escape:1849:initialized automaton to 1                                                                                      
process_escape:1861:walk result on 93 (]): 0 404                                                                                    
process_escape:1861:walk result on 52 (4): 0 405                                                                                    
process_escape:1861:walk result on 59 (;): 0 406                                                                                    
process_melange:2035:input 4092/3 [0x5d] (])                                                                                        
process_melange:2035:input 4093/2 [0x34] (4)                                                                                        
process_melange:2035:input 4094/1 [0x3b] (;)                                                                                        
block_on_input:2115:blocking on input availability                                                                                  
block_on_input:2172:waiting on 1 fds (ibuf: 0/8192)                                                                                 
block_on_input:2199:poll returned 1                                                                                                 
block_on_input:2213:got events: tI                                                                                                  
read_input_nblock:1811:read 3192B from 0 (5000B left)                                                                               
process_melange:2035:input 0/3192 [0x31] (1)                                                                                        
process_melange:2035:input 1/3191 [0x34] (4)                                                                                        
process_melange:2035:input 2/3190 [0x37] (7)                                                                                        
process_melange:2035:input 3/3189 [0x3b] (;)                                                                                        
process_melange:2035:input 4/3188 [0x72] (r)                                                                                        
process_melange:2035:input 5/3187 [0x67] (g)                                                                                        
process_melange:2035:input 6/3186 [0x62] (b)                                                                                        
process_melange:2035:input 7/3185 [0x3a] (:)                                                                                        
process_melange:2035:input 8/3184 [0x61] (a)                                                                                        
process_melange:2035:input 9/3183 [0x66] (f)                                                                                        
process_melange:2035:input 10/3182 [0x61] (a)                                                                                       
process_melange:2035:input 11/3181 [0x66] (f)                                                                                       
process_melange:2035:input 12/3180 [0x2f] (/)                                                                                       
process_melange:2035:input 13/3179 [0x61] (a)                                                                                       
process_melange:2035:input 14/3178 [0x66] (f)                                                                                       
process_melange:2035:input 15/3177 [0x61] (a)                                                                                       
process_melange:2035:input 16/3176 [0x66] (f)                                                                                       
process_melange:2035:input 17/3175 [0x2f] (/)                                                                                       
process_melange:2035:input 18/3174 [0x66] (f)                                                                                       
process_melange:2035:input 19/3173 [0x66] (f)                                                                                       
process_melange:2035:input 20/3172 [0x66] (f)                                                                                       
process_melange:2035:input 21/3171 [0x66] (f)                                                                                       
process_melange:2035:input 22/3170 [0x1b] ( )                                                                                       
process_escape:1861:walk result on 52 (4): 0 407                                                                                    
process_escape:1861:walk result on 59 (;): 0 408                                                                                    
walk_automaton:559:unexpected transition on 408[49]                                                                                 
process_escape:1861:walk result on 49 (1): -1 0                                                                                     
process_melange:2035:input 23/3169 [0x5c] (\)                                                                                       
process_melange:2035:input 24/3168 [0x1b] ( )                                                                                       
process_escape:1849:initialized automaton to 1        

as you can see, it wasn't properly combined, and we ended up (a) losing the sequence and (b) echoing it to output.

@dankamongmen dankamongmen added bug Something isn't working input readin' dem bytes labels Dec 10, 2021
@dankamongmen dankamongmen added this to the 4.0.0 milestone Dec 10, 2021
@dankamongmen dankamongmen self-assigned this Dec 10, 2021
@dankamongmen
Copy link
Owner Author

we're heading directly into process_melange() at the end. we ought be leaving that open.

@dankamongmen
Copy link
Owner Author

we're clearing ictx->midescape, and shouldn't be.

@dankamongmen
Copy link
Owner Author

ok, this is handled in dankamongmen/getpalette.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working input readin' dem bytes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant