GNU libc (Glibc) 2.18 发布

Glibc 2.18 正式版发布,修复了大量 bug,并增强了安全性,包括禁止伪终端被错误地授予其他用户的访问权限等。此版本还增加了对 C++11 的支持,优化了多个架构下的字符串和数学函数性能。

标准C库Glibc发布2.18正式版。2013-08-12 上一个版本是2012-12-25的2.17。

详细改进:Version 2.18

* The following bugs are resolved with this release:

  2546, 2560, 5159, 6809, 7006, 10060, 10062, 10283, 10357, 10686, 11120,
  11561, 12310, 12387, 12492, 12515, 12723, 13550, 13889, 13951, 13988,
  14142, 14176, 14200, 14256, 14280, 14293, 14317, 14327, 14478, 14496,
  14582, 14686, 14812, 14888, 14894, 14907, 14908, 14909, 14920, 14952,
  14964, 14981, 14982, 14985, 14991, 14994, 14996, 15000, 15003, 15006,
  15007, 15014, 15020, 15022, 15023, 15036, 15054, 15055, 15062, 15078,
  15084, 15085, 15086, 15100, 15160, 15214, 15221, 15232, 15234, 15283,
  15285, 15287, 15304, 15305, 15307, 15309, 15327, 15330, 15335, 15336,
  15337, 15339, 15342, 15346, 15359, 15361, 15366, 15380, 15381, 15394,
  15395, 15405, 15406, 15409, 15416, 15418, 15419, 15423, 15424, 15426,
  15429, 15431, 15432, 15441, 15442, 15448, 15465, 15480, 15485, 15488,
  15490, 15492, 15493, 15497, 15506, 15529, 15536, 15553, 15577, 15583,
  15618, 15627, 15631, 15654, 15655, 15666, 15667, 15674, 15711, 15755,
  15759.

* CVE-2013-2207 Incorrectly granting access to another user's pseudo-terminal
  has been fixed by disabling the use of pt_chown (Bugzilla #15755).
  Distributions can re-enable building and using pt_chown via the new configure
  option `--enable-pt_chown'.  Enabling the use of pt_chown carries with it
  considerable security risks and should only be used if the distribution
  understands and accepts the risks.

* CVE-2013-0242 Buffer overrun in regexp matcher has been fixed (Bugzilla
  #15078).

* CVE-2013-1914 Stack overflow in getaddrinfo with many results has been
  fixed (Bugzilla #15330).

* Add support for calling C++11 thread_local object destructors on thread
  and program exit.  This needs compiler support for offloading C++11
  destructor calls to glibc.

* Improved worst case performance of libm functions with double inputs and
  output.

* Support for priority inherited mutexes in pthread condition variables on
  non-x86 architectures.

* Port to Xilinx MicroBlaze contributed by David Holsgrove.

* Optimized string functions for AArch64.  Implemented by Marcus Shawcroft.

* Optimized string functions for ARM.  Implemented by Will Newton and
  Richard Henderson.

* Optimized libm functions for SPARC.  Implemented by David S. Miller.

* Support for building more of ARM glibc as Thumb-2 code.  Implemented by
  Richard Henderson.

* Support for building most of MIPS glibc as MIPS16 code.  Implemented by
  Chung-Lin Tang, Maciej W. Rozycki and Maxim Kuvyrkov.

* Added a benchmark framework to track performance of functions in glibc.

* New <math.h> macro named issignaling to check for a signaling NaN (sNaN).
  It is based on draft TS 18661 and currently enabled as a GNU extension.

* On Linux, the clock function now uses the clock_gettime system call
  for improved precision, rather than old times system call.

* Added new API functions pthread_getattr_default_np and
  pthread_setattr_default_np to get and set the default pthread
  attributes of a process.

* Added support for TSX lock elision for pthread mutexes on i386 and x86-64.
  This may improve lock scaling of existing programs on TSX capable systems.
  When the --enable-lock-elision=yes parameter is specified at configure
  time lock elision will be enabled by default for all PTHREAD_MUTEX_DEFAULT
  mutexes.

* Support added for AT_HWCAP2 (to coincide with Linux kernel 3.10
  availability).  Implemented by Ryan S. Arnold.

* Support added for POWER8 platform.  Implemented by Ryan S. Arnold.

下载:http://ftp.gnu.org/gnu/glibc/glibc-2.18.tar.bz2

### 升级 glibc2.17 到 2.18 的方法 glibcGNU C Library)是 Linux 系统中非常重要的基础库,许多系统程序和应用程序都依赖于它。如果需要将 glibc 从版本 2.17 升级到 2.18,可以通过源码编译安装的方式完成。 #### 1. 准备工作 在开始升级之前,请确保系统已经安装了必要的开发工具和依赖项。可以使用以下命令安装这些工具: ```bash yum groupinstall "Development Tools" yum install -y gawk make wget gcc ``` #### 2. 下载 glibc 2.18 源码包 可以从 GNU 官方网站下载 glibc 2.18 的源码包: ```bash wget http://ftp.gnu.org/gnu/glibc/glibc-2.18.tar.gz ``` #### 3. 解压并进入源码目录 ```bash tar -zxvf glibc-2.18.tar.gz cd glibc-2.18 ``` #### 4. 创建构建目录并配置编译参数 glibc 不建议直接在源码目录中进行编译,推荐创建一个单独的构建目录: ```bash mkdir build cd build ``` 然后运行 `configure` 命令来配置编译参数: ```bash ../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin ``` #### 5. 编译并安装 使用 `make` 命令进行编译,并指定 `-j` 参数以加快编译速度(根据 CPU 核心数调整): ```bash make -j4 ``` 编译完成后,执行安装命令: ```bash make install ``` #### 6. 验证安装 安装完成后,可以通过以下命令验证 glibc 版本是否已成功升级到 2.18: ```bash ldd --version ``` 此外,还可以查看 `/lib64/libc.so.6` 文件中的 GLIBC 版本信息: ```bash strings /lib64/libc.so.6 | grep GLIBC ``` 输出结果中应该包含 `GLIBC_2.18`。 #### 7. 注意事项 - **兼容性问题**:升级 glibc 可能会导致某些依赖旧版本的程序无法正常运行。建议在测试环境中先进行充分验证。 - **回滚机制**:如果升级后出现问题,可以通过重新安装 glibc 2.17 来回滚。通常可以通过清理 `/usr/lib` 和 `/usr/include` 中的 glibc 文件,并重新安装原始版本的 glibc 包来实现。 - **软链接问题**:升级后如果发现系统仍然指向旧版本的 glibc,可能需要手动调整 `/lib64/libc.so.6` 软链接[^2]。 --- ### 示例代码 以下是一个完整的脚本示例,用于自动化升级 glibc2.18: ```bash #!/bin/bash # 安装必要的开发工具 yum groupinstall "Development Tools" -y yum install -y gawk make wget gcc # 下载 glibc 2.18 源码包 wget http://ftp.gnu.org/gnu/glibc/glibc-2.18.tar.gz # 解压并进入源码目录 tar -zxvf glibc-2.18.tar.gz cd glibc-2.18 # 创建构建目录 mkdir build cd build # 配置编译参数 ../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin # 编译并安装 make -j4 make install # 验证安装 ldd --version strings /lib64/libc.so.6 | grep GLIBC ``` --- ###
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值