What Can Cause a C Program to Crash Operating System -
i found big image manipulation programme i'm writing in c on windows 8 machine has bug when used in particular circumstances. unfortunately, bug causing entire computer come standstill alternative pull plug on computer (especially annoying when i'm working remotely...)
because it's image manipulation program, can't flood print statements isolate problematic section - problem occurs somewhere in loop that's called billions of times, adding printf slows downwards point take days failing iteration.
i understand, therefore, if question broad, isn't reasonable me set downwards of code cause problem, i'm asking
what circumstances in c code can, instead of seg faulting or halting program, freeze entire os
when search problem, see code golf game questions
a c programme crashes system(shuts downwards system)
this not i'm asking - haven't written system("shutdown") anywhere in loop.
being familiar python , java, problem not i'm used to, in experience,
dividing 0 produces seg fault accessing memory accident outside intended array causes seg fault (sometimes downwards road little) accessing protected memory causes programme hang stack overflow causes seg fault dereferencing non-initialized pointer causes seg faultis impression false - cases cause whole scheme crash? cases missing? dependent on version of gcc, or permission status?
i haven't been able seek reproduce on different operating scheme yet, requires few dependencies run entire program.
if alternative sit down days waiting programme run print statements, or avoid weird situations, then, of course, it. i'm looking key places bug.
on modern systems hardware-enforced privilege separation between user-mode , kernel-mode, , operating scheme functions correctly configure these mechanisms, simply cannot crash scheme user mode process.
any of errors trapped cpu, phone call exception handlers in os pull plug on system.
if had guess, piece of hardware overheating or malfunctioning:
overheating cpu due poor thermal conductivity heatsink failing / under-sized powerfulness supply failing dimms failing hard drive failing cpu failing / overheating gpui've seen cryptocoin-mining software bring scheme knees because pushing limits of gpu. when card lock-up/reset, driver confused or lock-up, , scheme end needed rebooted.
your scheme doing next nothing when you're sitting there browsing web, etc. if scheme locks when start running cpu-intensive application, can bring out problems didn't know there.
while little out-of-place on stack overflow, falls 1 of gray areas between hardware , software. stress-test system, keeping eye on cpu/gpu/memory temperatures, , powerfulness supply voltages. check out memtest86, stresslinux.
c crash operating-system
No comments:
Post a Comment