1. 15 4月, 2012 1 次提交
    • R
      fix signedness error handling invalid multibyte sequences in regexec · b9dd43db
      Rich Felker 提交于
      the "< 0" test was always false due to use of an unsigned type. this
      resulted in infinite loops on 32-bit machines (adding -1U to a pointer
      is the same as adding -1) and crashes on 64-bit machines (offsetting
      the string pointer by 4gb-1b when an illegal sequence was hit).
      b9dd43db
  2. 14 4月, 2012 3 次提交
    • R
      rename __sa_restorer to sa_restorer in struct sigaction · 0115a6ed
      Rich Felker 提交于
      this is legal since sa_* is in the reserved namespace for signal.h,
      per posix. note that the sa_restorer field is not used anywhere, so
      programs that are trying to use it may still break, but at least
      they'll compile. if it turns out such programs actually need to be
      able to set their own sa_restorer to function properly, i'll add the
      necessary code to sigaction.c later.
      0115a6ed
    • R
      remove invalid code from TRE · 386b34a0
      Rich Felker 提交于
      TRE wants to treat + and ? after a +, ?, or * as special; ? means
      ungreedy and + is reserved for future use. however, this is
      non-conformant. although redundant, these redundant characters have
      well-defined (no-op) meaning for POSIX ERE, and are actually _literal_
      characters (which TRE is wrongly ignoring) in POSIX BRE mode.
      
      the simplest fix is to simply remove the unneeded nonstandard
      functionality. as a plus, this shaves off a small amount of bloat.
      386b34a0
    • R
      fix broken regerror (typo) and missing message · b6dbdc69
      Rich Felker 提交于
      b6dbdc69
  3. 13 4月, 2012 3 次提交
  4. 12 4月, 2012 9 次提交
  5. 11 4月, 2012 7 次提交
  6. 10 4月, 2012 3 次提交
    • R
      new floating point parser/converter · 415c4cd7
      Rich Felker 提交于
      this version is intended to be fully conformant to the ISO C, POSIX,
      and IEEE standards for conversion of decimal/hex floating point
      strings to float, double, and long double (ld64 or ld80 only at
      present) values. in particular, all results are intended to be rounded
      correctly according to the current rounding mode. further, this
      implementation aims to set the floating point underflow, overflow, and
      inexact flags to reflect the conversion performed.
      
      a moderate amount of testing has been performed (by nsz and myself)
      prior to integration of the code in musl, but it still may have bugs.
      
      so far, only strto(d|ld|f) use the new code. scanf integration will be
      done as a separate commit, and i will add implementations of the wide
      character functions later.
      415c4cd7
    • R
      fix alloca issue in stdlib.h too · 3be616c1
      Rich Felker 提交于
      I forgot _GNU_SOURCE also has it declared here...
      3be616c1
    • R
      alloca cannot be a function. #define it to the gcc builtin if possible · d71d0805
      Rich Felker 提交于
      gcc makes this mapping by default anyway, but it will be disabled by
      -fno-builtin (and presumably by -std=c99 or similar). for the main
      program the error will be reported by the linker, and the issue can
      easily be fixed, but for dynamic-loaded so files, the error cannot be
      detected until dlopen time, at which point it has become very obscure.
      d71d0805
  7. 04 4月, 2012 3 次提交
    • N
      math: fix x86 asin accuracy · 37eaec3a
      nsz 提交于
      use (1-x)*(1+x) instead of (1-x*x) in asin.s
      the later can be inaccurate with upward rounding when x is close to 1
      37eaec3a
    • R
      work around nasty gcc bug in the i386 syscall asm · 5bd0ab8a
      Rich Felker 提交于
      when the "r" (register) constraint is used to let gcc choose a
      register, gcc will sometimes assign the same register that was used
      for one of the other fixed-register operands, if it knows the values
      are the same. one common case is multiple zero arguments to a syscall.
      this horribly breaks the intended usage, which is swapping the GOT
      pointer from ebx into the temp register and back to perform the
      syscall.
      
      presumably there is a way to fix this with advanced usage of register
      constaints on the inline asm, but having bad memories about hellish
      compatibility issues with different gcc versions, for the time being
      i'm just going to hard-code specific registers to be used. this may
      hurt the compiler's ability to optimize, but it will fix serious
      miscompilation issues.
      
      so far the only function i know what compiled incorrectly is
      getrlimit.c, and naturally the bug only applies to shared (PIC)
      builds, but it may be more extensive and may have gone undetected..
      5bd0ab8a
    • R
      450f2c4a
  8. 02 4月, 2012 1 次提交
    • R
      improve name lookup performance in corner cases · 4f346b08
      Rich Felker 提交于
      the buffer in getaddrinfo really only matters when /etc/hosts is huge,
      but in that case, the huge number of syscalls resulting from a tiny
      buffer would seriously impact the performance of every name lookup.
      
      the buffer in __dns.c has also been enlarged a bit so that typical
      resolv.conf files will fit fully in the buffer. there's no need to
      make it so large as to dominate the syscall overhead for large files,
      because resolv.conf should never be large.
      4f346b08
  9. 31 3月, 2012 2 次提交
  10. 29 3月, 2012 4 次提交
  11. 28 3月, 2012 4 次提交