6 ms·
Actually, the "segmentation" comes from segmented memory management, which was integrated into in AT&T Unix. BSD went with paged virtual memory, and there we ge
by kazinator 6y ago
Actually, the "segmentation" comes from segmented memory management, which was integrated into in AT&T Unix. BSD went with paged virtual memory, and there we get "fault" from "page fault", which is an often correctable situation that is invisible to the application, but is sometimes an access violation.
So "segmentation fault" is a weird combination of terms.
And of course "core" is from "magnetic core memory" that nobody uses any more.
The SIGSEGV constant having come from AT&T Unix propagated into other variants, for the sake of source code compatibility, even though those other variants didn't use segmented memory.
I suspect that what happened was that hackers not working with segmented memory at all somehow adopted the "segmentation" term from the AT&T code and documentation, but did not warm up to the "violation" part, sticking with the "fault" terminology of their paged world.
The "Segmentation fault" string you see displayed by the shell comes from the strsignal function that maps signals to descriptive strings. I think that originated in BSD Unix. "(core dumped)" is locally generated by the shell if that flag is true in the process status.
Bash internationalizes that with gettext. Here it is in Hungarian:
po/hr.po:msgid " (core dumped)"
po/hr.po-msgstr " (jezgra izbačena)"
Estonia gets a cool one:
po/eo.po:msgid " (core dumped)"
po/eo.po-msgstr "(nekropsio elŝutita)"
Trivia: very early Linux kernel versions used 80386 segments for processes.
- rob74 6y ago"hr" is Croatian, Hungarian would be "hu" (and no doubt it sounds cool too). And yeah, a "necropsy" (synonym for autopsy) definitely sounds cooler than a "dump"... Otherwise: great summary, almost more interesting (and more compact) than the original blog post!
- zvrba 6y ago> "hr" is Croatian, Hungarian would be "hu" (and no doubt it sounds cool too). And the translation is abysmal: "jezgra" = "core" (of nuclear reactor) or "nucleus" (of an atom); the closest translation for "izbačena" is "ejected". I believe that "core" comes originally from memory technology of the time (https://en.wikipedia.org/wiki/Magnetic-core_memory https://en.wikipedia.org/wiki/Magnetic-core_memory) so it should have been possible to find a more meaningful translation. EDIT: As a native Croatian speaker, I have NEVER used any program in Croatian locale. It is simply unintelligible. Funnily, I find Norwegian (where I live now) translations more approachable.
- pantalaimon 6y agoLocalized error messages (that are still full of jargon) are terrible. It makes looking them up online much harder and often the translation does not more than obfuscation.
- necovek 6y agoThe goal of "izbačena" here is clearly to indicate that the memory has been stored elsewhere. FWIW, "dumping trash" would be readily translated to "избацити смеће" (izbaciti smeće) in Serbian, so I am surprised it's such a stretch in Croatian. Perhaps the Croatian translation has been based off Serbian one. You are probably more accustomed to Norwegian translations because you never learned Norwegian IT-speak before the translations appeared, whereas I imagine you grew up on English interfaces while speaking Croatian (we term that Srblish, maybe you've got Croglish :)).
- zvrba 6y agoCroatian "izbaciti" is closest to this meaning: https://www.merriam-webster.com/dictionary/eject https://www.merriam-webster.com/dictionary/eject or the phrase "throw out". F.ex., "Izbacivac" [sorry, haven't bothered with setting up HR keys] is the guy throwing out too drunk people from a club. > "избацити смеће" (izbaciti smeće) in Serbian, so I am surprised it's such a stretch in Croatian But that's exactly it! You "izbacis smece" and you don't care what happens to it after. Likewise with "izbacivac", he throws out a person and doesn't care what the person does afterwards. You don't "izbacis" something FOR someone to use it after. That's why the translation is bothering me. Whereas the kernel writes the core FOR THE USER to inspect it, back it up, delete it, whatever. The closest word I can come up with for English "dump" https://www.merriam-webster.com/dictionary/dump https://www.merriam-webster.com/dictionary/dump is "ostaviti" ("leave around") ili "(is)pustiti" (in the meaning of "drop", not "flushing the toilet" :D). A better literal translation would thus be "Jezgra pustena." (Like a space probe is "pustena" into space and there it goes.) I guess the authors originally used "dump" because it's kinda random (system-wide config) where it ends up. The most meaningful translation to Croatian would be, IMHO, "Memorija sacuvana." [or "Memorija spremljena."] ("Memory preserved".) > I imagine you grew up on English interfaces while speaking Croatian Indeed. Some professors at the university did use Croatian terms, but everything about it was awfully alien to me. "Thread" would be "dretva". Which is ironic, as the professor explained that it's borrowed and mangled from German, whereas we have a perfectly valid, even nice, Croatian word "nit" that is literally "thread".
- dzsekijo 6y agoI checked Hungarian, it's simply "core készült" ("core has been made"). I guess they did not want to go too far with translating "core" as possible faithful translations would collate with expressions for ejaculation...
- WesolyKubeczek 6y agoeo is Esperanto, Estonian looks like a version of Finnish. (so does Hungarian, as sibling has pointed out)
- cat199 6y agodidn't go too deep on the code spelunking, but v7 Unix (and 2BSD) used 'swapping' rather than paging, where the whole process was moved in/out of RAM, 32V (32bit v7 for the vax by AT&T) kept this, 3BSD (32V++ in a way) added paged memory, and this was reworked in 4.3BSD (see 44doc newvm), Mach VM, etc. can confirm SEGV is in v7 signal.h from 1979: https://www.tuhs.org/cgi-bin/utree.pl?file=V7/usr/include/signal.h https://www.tuhs.org/cgi-bin/utree.pl?file=V7/usr/include/si... where it is happily #defined as 11, and continues as such to this day: https://github.com/freebsd/freebsd/blob/master/sys/sys/signal.h https://github.com/freebsd/freebsd/blob/master/sys/sys/signa... (etc, in the other BSD-derived systems) if anyone wants to dig further.
- necovek 6y agoWhen I played with IA32 in assembly, I think it was possible to swap segments in and out as well (you could order actual printed IA32 books from Intel for free, which was great for a high-school student in Serbia in late 1990s ;)). It was a long time ago, so maybe I am misremembering things. Thus, I always considered "paging" a shorthand for "swapping of memory pages".
- kazinator 6y agoThe term "swapping" originally comes from the multiprogramming technique of exchanging an entire program in memory, and its data, for another program and its data (without any virtual memory support).
- schoen 6y ago> Estonia gets a cool one: Sad to say that's also not Estonian -- it's Esperanto. :-)