Re: Overcomittable memory

From: Olaf Weber (olaf@infovore.xs4all.nl)
Date: Fri Mar 31 2000 - 14:51:12 EST

  • Next message: B. James Phillippe: "Re: Linux 2000(tm)(r)"

    John Ripley writes:
    > Olaf Weber wrote:

    >> volatile caddr_t bad_addr;
    >> jmp_buf env;
    >>
    >> void sigbus_action(int sig, siginfo_t *siginfo, void *dummy)
    >> {
    >> if (siginfo) {
    >> bad_addr = siginfo->si_addr;
    >> }
    >> longjmp(env, 1);
    >> }

    > longjmp won't work because it'll be running the program from within
    > the signal handler.

    You are definitely allowed to use longjmp to return from a signal
    handler when the signal was produced by raise(3) or abort(3). Many
    systems, AFAIK Linux among them, allow you to use longjmp in the
    general case.

    -- 
    Olaf Weber
    

    Do not meddle in the affairs of sysadmins, for they are quick to anger and have no need for subtlety.

    - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



    This archive was generated by hypermail 2b29 : Sat Apr 01 2000 - 03:27:20 EST