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.
This commit is contained in:
cypherpunks
2015-12-15 16:30:04 +01:00
committed by Nick Mathewson
parent 254d63dabe
commit 07cca627ea
4 changed files with 13 additions and 10 deletions
+3
View File
@@ -0,0 +1,3 @@
o Minor bugfixes (compilation):
- Fix backtrace compilation on FreeBSD. Fixes bug 17827; bugfix on
tor-0.2.5.2-alpha.