Skip to content

minishell when typing, easily execute code outside RAM or ROM on stm32p103 #12

@mlouielu

Description

@mlouielu

When running qemu with stm32p103, typing in minishell will easily crash.

Memory map:                  
  .text   = 00000140--000225d0  140432 Bytes               
  .rodata = 00022608--000298ee   29414 Bytes               
  .data   = 20000000--2000051c    1308 Bytes               
  .bss    = 20000520--20001c6c    5964 Bytes               
  .heap   = 20001c80--20009c80   32768 Bytes               
  .pgmem  = 20018000--2001f000   28672 Bytes               
Order  Bitmap                
    0  00000000  00000000  00000000  00000000              
    1  00000000  00000000    
    2  00000000              
    3  00007fff              
Created idle_thread at <0x20018200>                        
Created main_thread at <0x20018800> with priority=31       
Reclaim early stack's physical memory (2048 Bytes, order=3).                                                          
Creating /proc/version       
Creating /proc/meminfo       
Creating /dev/mem            
Creating /dev/null           
Creating /dev/zero           
Creating /dev/random         
Creating MTD device mtd0     
Kernel bootstrap done.       
--                           
Piko version 0.0.0 (grd@louie) (armv7-m, cortex-m4) #Tue Aug 15 10:48:37 2017                                         
arm-none-eabi-gcc (Arch Repository) 7.1.0                  

$ pqemu: fatal: Trying to execute code outside RAM or ROM at 0x79797978                                               

R00=79797979 R01=00000026 R02=00000001 R03=00000000        
R04=00000000 R05=00000000 R06=00000000 R07=20018fd8        
R08=00000000 R09=00000000 R10=00000000 R11=00000000        
R12=00000000 R13=200189fc R14=00000483 R15=79797978        
PSR=00000173 ---- T svc32    
FPSCR: 00000000              
make: *** [target/stm32p103/build.mk:6: run] Aborted (core dumped)                                                    

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions