Jump to content

Getting a segmentation fault in ARM Assembly

thedangerine

I am currently in an assembly class where we use ras pi 3's for our labs and I keep getting a segmentation fault in this code. It appears at the first line, if I remove my first line it just says the seg fault is at the next line. Anyone have any ideas as to why?

 

Seg fault.png

Optical Drive Poll: https://linustechtips.com/main/topic/1006309-optical-drive-survey/

Main Rig (Pulsar)

CPU: Ryzen 7 5800X MOBO: MSI MEG X570 Unify RAM: Corsair Dominator Platinum RG(4x8gb) 3200Mhz 16-16-16-32 GPU: EVGA GTX 1080 FTW ACX 3.0 Cooler: Noctua NH-U12S Chromax (LTT Edition) Storage: Intel 6000p 128gb boot drive, Intel 665p 1tb (x2), Samsung 850 EVO 1tb, Case: Phanteks Enthoo Pro M Tempered Glass PSU: EVGA SupeNOVA G1+ 750W OS: Windows 10 Pro 64 bit  

FreeNAS Server (The Vault)

CPU: Xeon E5-2603 v3 MOBO: MSI X99 Tomahawk RAM: G.Skill Aegis (4x8gb) 3000Mhz 16-18-18-38 GPU: EVGA GT 710 Cooler: Cooler Master Hyper 212 LED Storage: Intel S3520 x2 for boot, x16 in RAIDZ for storage, Seagate Ironwolf 2tb (Striped will be a steam cache) Case: Phanteks Enthoo Pro Tempered Glass PSU: Corsair CX750 750W

Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, thedangerine said:

I am currently in an assembly class where we use ras pi 3's for our labs and I keep getting a segmentation fault in this code. It appears at the first line, if I remove my first line it just says the seg fault is at the next line. Anyone have any ideas as to why?

Is the RPI running an OS? If so, which one?

ENCRYPTION IS NOT A CRIME

Link to comment
Share on other sites

Link to post
Share on other sites

Sounds like a compilation issue of some sorts. You seem to make a correct executable, because otherwise you'd get an "invalid ELF" error, something else might be off. How do you assemble it to binary?

 

EDIT: To be clear, SIGSEGV happens when your process tries to access memory it's not supposed to. If your application does that on the first line (loading the address of the array), it tells me your process map is set up incorrectly (segment not in process scope), or something related to that.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×