]> git.ipfire.org Git - thirdparty/tor.git/commit
Fix backtrace compilation on FreeBSD
authorcypherpunks <cypherpunks@torproject.org>
Tue, 15 Dec 2015 15:30:04 +0000 (16:30 +0100)
committerNick Mathewson <nickm@torproject.org>
Tue, 15 Dec 2015 16:52:00 +0000 (11:52 -0500)
commit07cca627eaab800d4874f3d0914d3cf7eaa601a9
tree6fec11ee49f2c8fb086e3d60be3291b73fe790f9
parent254d63dabe0b89f83c4df0edb1daf719cc5d4ab7
Fix backtrace compilation on FreeBSD

On FreeBSD backtrace(3) uses size_t instead of int (as glibc does). This
causes integer precision loss errors when we used int to store its
results.

The issue is fixed by using size_t to store the results of backtrace(3).

The manual page of glibc does not mention that backtrace(3) returns
negative values. Therefore, no unsigned integer wrapping occurs when its
result is stored in an unsigned data type.
changes/bug17827 [new file with mode: 0644]
src/common/backtrace.c
src/common/backtrace.h
src/common/sandbox.c