Results 1 to 4 of 4

Thread: Where is the Definition of __ptrlow (ARG)?

  1. #1
    Join Date
    Jan 2009
    Beans
    328

    Where is the Definition of __ptrlow (ARG)?

    Hello all:
    I am a beginner at Ubuntu. I have downloaded the Glibc 2.2.5 source code and begin reading.
    The final of the thread is the source code of “strcpy”. And I am trying to expand all the related macros in code.
    Much of the macro realizations have been found, except this headache one "__ptrlow (ARG)". Wherever else should I search? Or is there any other source
    code which I am missing?
    Also, could someone be kind to provide me with a “find“ cmd to search a key word within the forest of codes?
    I am expecting a cmd like this one:
    find /media/storage/programming/ -name "makefile" -o -name "*.c" -o -name "*.cc" -path "/media/storage/" -prune> /media/storage/programming/shell/find.log
    ================================================== ===============
    strcpy (dest, src)
    char *dest;
    const char *src;
    {
    reg_char c;
    char *__unbounded s = (char *__unbounded) CHECK_BOUNDS_LOW (src);
    const ptrdiff_t off = CHECK_BOUNDS_LOW (dest) - s - 1;
    size_t n;

    do
    {
    c = *s++;
    s[off] = c;
    }
    while (c != '\0');

    n = s - src;
    (void) CHECK_BOUNDS_HIGH (src + n);
    (void) CHECK_BOUNDS_HIGH (dest + n);

    return dest;
    }
    ================================================== ===============

  2. #2
    Join Date
    Oct 2007
    Beans
    1,914
    Distro
    Lubuntu 12.10 Quantal Quetzal

    Re: Where is the Definition of __ptrlow (ARG)?

    Look here: http://ftp.softnet.tuc.gr/pub/gnu/ww...s/bp/main.html

    It looks like this is an operator of the GCC.

  3. #3
    Join Date
    Sep 2006
    Location
    Rosario, Argentina
    Beans
    241
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Where is the Definition of __ptrlow (ARG)?

    Quote Originally Posted by huangyingw View Post
    could someone be kind to provide me with a “find“ cmd to search a key word within the forest of codes?
    grep

  4. #4
    Join Date
    Jan 2009
    Beans
    328

    Re: Where is the Definition of __ptrlow (ARG)?

    Quote Originally Posted by Zugzwang View Post
    Look here: http://ftp.softnet.tuc.gr/pub/gnu/ww...s/bp/main.html

    It looks like this is an operator of the GCC.
    Yes, this link tell me something about Bounds checking. But it doesn't tell me where could I found the realization of __ptrlow (ARG). Could you provide me more clues?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •