πŸ“–
Wiki
CNCFSkywardAIHuggingFaceLinkedInKaggleMedium
  • Home
    • πŸš€About
  • πŸ‘©β€πŸ’»πŸ‘©Freesoftware
    • πŸ‰The GNU Hurd
      • πŸ˜„The files extension
      • πŸ“½οΈTutorial for starting
      • 🚚Continue Working for the Hurd
      • πŸš΄β€β™‚οΈcgo
        • πŸ‘―β€β™€οΈStatically VS Dynamically binding
        • 🧌Different ways in binding
        • πŸ‘¨β€πŸ’»Segfault
      • πŸ›ƒRust FFI
    • πŸ§šπŸ»β€β™‚οΈProgramming
      • πŸ“–Introduction to programming
      • πŸ“–Mutable Value Semantics
      • πŸ“–Linked List
      • πŸ“–Rust
        • πŸ“–Keyword dyn
        • πŸ“–Tonic framework
        • πŸ“–Tokio
        • πŸ“–Rust read files
  • πŸ›€οΈAI techniques
    • πŸ—„οΈframework
      • 🧷pytorch
      • πŸ““Time components
      • πŸ““burn
    • 🍑Adaptation
      • 🎁LoRA
        • ℹ️Matrix Factorization
        • πŸ“€SVD
          • ✝️Distillation of SVD
          • 🦎Eigenvalues of a covariance matrix
            • 🧧Eigenvalues
            • πŸͺCovariance Matrix
        • πŸ›«Checkpoint
      • 🎨PEFT
    • πŸ™‹β€β™‚οΈTraining
      • πŸ›»Training with QLoRA
      • 🦌Deep Speed
    • 🧠Stable Diffusion
      • πŸ€‘Stable Diffusion model
      • πŸ“ΌStable Diffusion v1 vs v2
      • πŸ€Όβ€β™€οΈThe important parameters for stunning AI image
      • ⚾Diffusion in image
      • 🚬Classifier Free Guidance
      • ⚜️Denoising strength
      • πŸ‘·Stable Diffusion workflow
      • πŸ“™LoRA(Stable Diffusion)
      • πŸ—ΊοΈDepth maps
      • πŸ“‹CLIP
      • βš•οΈEmbeddings
      • πŸ• VAE
      • πŸ’₯Conditioning
      • 🍁Diffusion sampling/samplers
      • πŸ₯ Prompt
      • πŸ˜„ControlNet
        • πŸͺ‘Settings Explained
        • 🐳ControlNet with models
    • πŸ¦™Large Language Model
      • ☺️SMID
      • πŸ‘¨β€πŸŒΎARM NEON
      • 🍊Metal
      • 🏁BLAS
      • πŸ‰ggml
      • πŸ’»llama.cpp
      • 🎞️Measuring model quality
      • πŸ₯žType for NNC
      • πŸ₯žToken
      • πŸ€Όβ€β™‚οΈDoc Retrieval && QA with LLMs
      • Hallucination(AI)
    • 🐹diffusers
      • πŸ’ͺDeconstruct the Stable Diffusion pipeline
  • 🎹Implementing
    • πŸ‘¨β€πŸ’»diffusers
      • πŸ“–The Annotated Diffusion Model
  • 🧩Trending
    • πŸ“–Trending
      • πŸ“–Vector database
      • 🍎Programming Languages
        • πŸ“–Go & Rust manage their memories
        • πŸ“–Performance of Rust and Python
        • πŸ“–Rust ownership and borrowing
      • πŸ“–Neural Network
        • 🎹Sliding window/convolutional filter
      • Quantum Machine Learning
  • 🎾Courses Collection
    • πŸ“–Courses Collection
      • πŸ“šAcademic In IT
        • πŸ“Reflective Writing
      • πŸ“–UCB
        • πŸ“–CS 61A
          • πŸ“–Computer Science
          • πŸ“–Scheme
          • πŸ“–Python
          • πŸ“–Data Abstraction
          • πŸ“–Object-Oriented Programming
          • πŸ“–Interpreters
          • πŸ“–Streams
      • 🍎MIT Algorithm Courses
        • 0️MIT 18.01
          • 0️Limits and continuity
          • 1️Derivatives
          • 3️Integrals
        • 1️MIT 6.042J
          • πŸ”’Number Theory
          • πŸ“ŠGraph Theory
            • 🌴Graph and Trees
            • 🌲Shortest Paths and Minimum Spanning Trees
        • 2️MIT 6.006
          • Intro and asymptotic notation
          • Sorting and Trees
            • Sorting
            • Trees
          • Hashing
          • Graphs
          • Shortest Paths
          • Dynamic Programming
          • Advanced
        • 3️MIT 6.046J
          • Divide and conquer
          • Dynamic programming
          • Greedy algorithms
          • Graph algorithms
Powered by GitBook
On this page
  • Overview
  • Memory protection
  • Methods
  • Source
  • Credit

Was this helpful?

Edit on GitHub
  1. πŸ‘©Freesoftware
  2. The GNU Hurd
  3. cgo

Segfault

Overview

In computing, a segmentation fault (often shortened to segfault) or access violation is a fault, or failure condition, raised by hardware with memory protection, notifying an operation system the software has attempted to access a restricted area of memory (a memory access violation).

The operating system kernel will in response, usually perform some corrective action, generally passing the fault on to the offending process by sending the process a signal. And the OS default signal handler generally causing abnormal termination of the process, and sometimes a core dump.

Many language employ mechnisms designed to avoid segmentation faults and improve memory safety. For example:

  • Rust employs an ownership-based model to ensure memory safety.

  • Golang employs a garbage collector to ensure memory safety.

  • Python employs a garbage collector to ensure memory safety.

Memory protection

Memory protection is a way to control memory access rights on a computer, and is a part of most modern instruction set architectures and operating systems. The main purpose of memory protection is to prevent a process from accessing memory that has not been allocated to it.

This prevents a bug or malware within a process from affecting other processes, or the operating system itself.

Memory protection can also be used to help prevent a process from accessing memory that it should not be able to see. For example, password checking programs work by comparing a password string input by the user to a stored copy of the password. If the password is stored in plaintext, then the password checking program must be able to read the stored password. However, if the password is stored as a cryptographic hash, then the password checking program should not be able to read the stored password, because the program does not need to know the password itself, only whether the password entered by the user is the same as the stored password. If the password checking program is able to read the stored password, then it is possible for a malicious user to exploit a bug in the password checking program to read the stored password, and then use it to gain access to the system. Memory protection can be used to prevent this from happening.

Methods

Segmentation

Segmentation refers to dividing a computer's memory into segments.

A reference to a memory location includes:

  • a value that identifies a segment

  • an offset within that segment

A segment descriptor may limit access rights, e.g:, read-only, only from certain rings.

x86 architecture It has multiple segmentation features, the Global Descriptor Table (GDT) and Local Descriptor Table (LDT) for x86 processors, and the Interrupt Descriptor Table (IDT) for x86 processors. Pointers to memory segments on x86 processors can also be stored in the processor's segment register, like CS (code segment), DS (data segment), ES (extra segment), SS (stack segment), FS (general purpose), and GS (general purpose).

Source

https://github.com/go-skynet/LocalAI/issues/622

Credit

https://en.wikipedia.org/wiki/Segmentation_fault

PreviousDifferent ways in bindingNextRust FFI

Last updated 1 year ago

Was this helpful?

πŸ‘©β€πŸ’»
πŸ‰
πŸš΄β€β™‚οΈ
πŸ‘¨β€πŸ’»