More emem removal.

Remove emem's 8-byte-memory-alignment configure check as well as references
to all the environment variables emem used.

Change-Id: I897aec9e9c68e064454561e7a9f066b18892ec66
Reviewed-on: https://code.wireshark.org/review/6950
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Jeff Morriss 2015-02-04 10:32:02 -05:00 committed by Anders Broman
parent 881ff5df92
commit 0b0f7fa091
7 changed files with 0 additions and 198 deletions

View File

@ -2912,28 +2912,6 @@ then
fi
AC_SUBST(extcapdir)
#
# Check if (emem) memory allocations must be 8-byte aligned.
# I haven't been able to write C code that reliably makes that determination
# (different versions of GCC with or without optimization give different
# results) so just assume everything except (32-bit) x86 needs 8-byte
# alignment (64-bit platforms either require 8-byte alignment for pointers
# and 64-bit integral data types or may get better performance from that;
# 64-bit x86 will get 8-byte alignment from G_MEM_ALIGN anyway. 32-bit
# platforms would only require it, or get better performance from it,
# for 64-bit floating-point values.).
#
AC_MSG_CHECKING(whether we need memory allocations to be 8-byte aligned)
case $host_cpu in
i386|i486|i586|i686)
AC_MSG_RESULT(no)
;;
*)
AC_MSG_RESULT(yes)
AC_DEFINE(NEED_8_BYTE_ALIGNMENT, 1, [Define if we need memory allocations to be 8-byte aligned])
;;
esac
dnl libtool defs
#
# Yes, AM_PROG_LIBTOOL is redundant with newer version(s) of some tool(s)

View File

@ -423,39 +423,6 @@ On Windows, Wireshark normally stores all application data in %APPDATA% or
%USERPROFILE%. You can override the default location by exporting this
environment variable to specify an alternate location.
=item WIRESHARK_DEBUG_EP_NO_CHUNKS
Normally per-packet memory is allocated in large "chunks." This behavior
doesn't work well with debugging tools such as Valgrind or ElectricFence.
Export this environment variable to force individual allocations.
Note: disabling chunks also disables canaries (see below).
=item WIRESHARK_DEBUG_SE_NO_CHUNKS
Normally per-file memory is allocated in large "chunks." This behavior
doesn't work well with debugging tools such as Valgrind or ElectricFence.
Export this environment variable to force individual allocations.
Note: disabling chunks also disables canaries (see below).
=item WIRESHARK_DEBUG_EP_NO_CANARY
Normally per-packet memory allocations are separated by "canaries" which
allow detection of memory overruns. This comes at the expense of some extra
memory usage. Exporting this environment variable disables these canaries.
=item WIRESHARK_DEBUG_SE_USE_CANARY
Exporting this environment variable causes per-file memory allocations to be
protected with "canaries" which allow for detection of memory overruns.
This comes at the expense of significant extra memory usage.
=item WIRESHARK_DEBUG_SCRUB_MEMORY
If this environment variable is set, the contents of per-packet and
per-file memory is initialized to 0xBADDCAFE when the memory is allocated
and is reset to 0xDEADBEEF when the memory is freed. This functionality is
useful mainly to developers looking for bugs in the way memory is handled.
=item WIRESHARK_DEBUG_WMEM_OVERRIDE
Setting this environment variable forces the wmem framework to use the
@ -514,27 +481,6 @@ it will, on some OSes, assuming your environment is configured correctly,
generate a core dump file. This can be useful to developers attempting to
troubleshoot a problem with a protocol dissector.
=item WIRESHARK_EP_VERIFY_POINTERS
This environment variable, if set, causes certain uses of pointers to be
audited to ensure they do not point to memory that is deallocated after each
packet has been fully dissected. This can be useful to developers writing or
auditing code.
=item WIRESHARK_SE_VERIFY_POINTERS
This environment variable, if set, causes certain uses of pointers to be
audited to ensure they do not point to memory that is deallocated after when
a capture file is closed. This can be useful to developers writing or
auditing code.
=item WIRESHARK_ABORT_ON_OUT_OF_MEMORY
This environment variable, if present, causes abort(3) to be called if certain
out-of-memory conditions (which normally result in an exception and an
explanatory error message) are experienced. This can be useful to developers
debugging out-of-memory conditions.
=back
=head1 SEE ALSO

View File

@ -1692,39 +1692,6 @@ On Windows, Wireshark normally stores all application data in %APPDATA% or
%USERPROFILE%. You can override the default location by exporting this
environment variable to specify an alternate location.
=item WIRESHARK_DEBUG_EP_NO_CHUNKS
Normally per-packet memory is allocated in large "chunks." This behavior
doesn't work well with debugging tools such as Valgrind or ElectricFence.
Export this environment variable to force individual allocations.
Note: disabling chunks also disables canaries (see below).
=item WIRESHARK_DEBUG_SE_NO_CHUNKS
Normally per-file memory is allocated in large "chunks." This behavior
doesn't work well with debugging tools such as Valgrind or ElectricFence.
Export this environment variable to force individual allocations.
Note: disabling chunks also disables canaries (see below).
=item WIRESHARK_DEBUG_EP_NO_CANARY
Normally per-packet memory allocations are separated by "canaries" which
allow detection of memory overruns. This comes at the expense of some extra
memory usage. Exporting this environment variable disables these canaries.
=item WIRESHARK_DEBUG_SE_USE_CANARY
Exporting this environment variable causes per-file memory allocations to be
protected with "canaries" which allow for detection of memory overruns.
This comes at the expense of significant extra memory usage.
=item WIRESHARK_DEBUG_SCRUB_MEMORY
If this environment variable is set, the contents of per-packet and
per-file memory is initialized to 0xBADDCAFE when the memory is allocated
and is reset to 0xDEADBEEF when the memory is freed. This functionality is
useful mainly to developers looking for bugs in the way memory is handled.
=item WIRESHARK_DEBUG_WMEM_OVERRIDE
Setting this environment variable forces the wmem framework to use the
@ -1783,27 +1750,6 @@ it will, on some OSes, assuming your environment is configured correctly,
generate a core dump file. This can be useful to developers attempting to
troubleshoot a problem with a protocol dissector.
=item WIRESHARK_EP_VERIFY_POINTERS
This environment variable, if present, causes certain uses of pointers to be
audited to ensure they do not point to memory that is deallocated after each
packet has been fully dissected. This can be useful to developers writing or
auditing code.
=item WIRESHARK_SE_VERIFY_POINTERS
This environment variable, if present, causes certain uses of pointers to be
audited to ensure they do not point to memory that is deallocated after when
a capture file is closed. This can be useful to developers writing or
auditing code.
=item WIRESHARK_ABORT_ON_OUT_OF_MEMORY
This environment variable, if present, causes abort(3) to be called if certain
out-of-memory conditions (which normally result in an exception and an
explanatory error message) are experienced. This can be useful to developers
debugging out-of-memory conditions.
=back
=head1 SEE ALSO

View File

@ -2743,39 +2743,6 @@ On Windows, Wireshark normally stores all application data in %APPDATA% or
%USERPROFILE%. You can override the default location by exporting this
environment variable to specify an alternate location.
=item WIRESHARK_DEBUG_EP_NO_CHUNKS
Normally per-packet memory is allocated in large "chunks." This behavior
doesn't work well with debugging tools such as Valgrind or ElectricFence.
Export this environment variable to force individual allocations.
Note: disabling chunks also disables canaries (see below).
=item WIRESHARK_DEBUG_SE_NO_CHUNKS
Normally per-file memory is allocated in large "chunks." This behavior
doesn't work well with debugging tools such as Valgrind or ElectricFence.
Export this environment variable to force individual allocations.
Note: disabling chunks also disables canaries (see below).
=item WIRESHARK_DEBUG_EP_NO_CANARY
Normally per-packet memory allocations are separated by "canaries" which
allow detection of memory overruns. This comes at the expense of some extra
memory usage. Exporting this environment variable disables these canaries.
=item WIRESHARK_DEBUG_SE_USE_CANARY
Exporting this environment variable causes per-file memory allocations to be
protected with "canaries" which allow for detection of memory overruns.
This comes at the expense of significant extra memory usage.
=item WIRESHARK_DEBUG_SCRUB_MEMORY
If this environment variable is set, the contents of per-packet and
per-file memory is initialized to 0xBADDCAFE when the memory is allocated
and is reset to 0xDEADBEEF when the memory is freed. This functionality is
useful mainly to developers looking for bugs in the way memory is handled.
=item WIRESHARK_DEBUG_WMEM_OVERRIDE
Setting this environment variable forces the wmem framework to use the
@ -2834,20 +2801,6 @@ it will, on some OSes, assuming your environment is configured correctly,
generate a core dump file. This can be useful to developers attempting to
troubleshoot a problem with a protocol dissector.
=item WIRESHARK_EP_VERIFY_POINTERS
This environment variable, if set, causes certain uses of pointers to be
audited to ensure they do not point to memory that is deallocated after each
packet has been fully dissected. This can be useful to developers writing or
auditing code.
=item WIRESHARK_SE_VERIFY_POINTERS
This environment variable, if set, causes certain uses of pointers to be
audited to ensure they do not point to memory that is deallocated after when
a capture file is closed. This can be useful to developers writing or
auditing code.
=item WIRESHARK_QUIT_AFTER_CAPTURE
Cause B<Wireshark> to exit after the end of the capture session. This
@ -2856,13 +2809,6 @@ that. You must also specify an autostop condition, e.g. B<-c> or B<-a
duration:...>. This means that you will not be able to see the results
of the capture after it stops; it's primarily useful for testing.
=item WIRESHARK_ABORT_ON_OUT_OF_MEMORY
This environment variable, if present, causes abort(3) to be called if certain
out-of-memory conditions (which normally result in an exception and an
explanatory error message) are experienced. This can be useful to developers
debugging out-of-memory conditions.
=back
=head1 SEE ALSO

View File

@ -16,11 +16,6 @@
* env \
* G_DEBUG=gc-friendly \
* G_SLICE=always-malloc \
* WIRESHARK_DEBUG_EP_NO_CHUNKS=1 \
* WIRESHARK_DEBUG_SE_NO_CHUNKS=1 \
* WIRESHARK_DEBUG_SE_USE_CANARY=1 \
* WIRESHARK_EP_VERIFY_POINTERS=1 \
* WIRESHARK_SE_VERIFY_POINTERS=1 \
* valgrind --leak-check=full --show-reachable=yes ./reassemble_test
*
* 2. Debug functions have been added which will print information

View File

@ -90,13 +90,6 @@ fi
##############################################################################
### Set up environment variables for fuzz testing ###
##############################################################################
# Initialize ep_ allocated memory to 0xBADDCAFE and freed memory
# to 0xDEADBEEF
export WIRESHARK_DEBUG_SCRUB_MEMORY=
# Verify that ep_ allocated memory is not passed to certain routines
# which need the memory to be persistent.
export WIRESHARK_EP_VERIFY_POINTERS=
export WIRESHARK_SE_VERIFY_POINTERS=
# Use the Wmem strict allocator which does canaries and scrubbing etc.
export WIRESHARK_DEBUG_WMEM_OVERRIDE=strict
# Abort if a dissector adds too many items to the tree

View File

@ -91,8 +91,6 @@ if [ "$BIN_DIR" = "." ]; then
fi
if [ "$TOOL" != "callgrind" ]; then
export WIRESHARK_DEBUG_EP_NO_CHUNKS=
export WIRESHARK_DEBUG_SE_NO_CHUNKS=
export WIRESHARK_DEBUG_WMEM_OVERRIDE=simple
export G_SLICE=always-malloc # or debug-blocks
fi