wireshark/tools
Darius Davis 5c2eade45d Tweak ws_cpuid so that Valgrind is happy.
Valgrind considers the "cpuid" instruction to always depend on inputs from eax
and ecx, even though it's only a subset of values of eax for which ecx is
relevant.  If ecx is undefined when cpuid is executed, the outputs of cpuid
will be considered undefined.

Instead of suppressing the resulting uninitialised-value warning (the
suppression for which is now out-of-date anyway, now that
register_all_protocols is moved to a worker thread), let's simply set ecx to
zero in ws_cpuid.

Testing done: Built Wireshark on Linux amd64.  Before this change, running
   "tools/valgrind-wireshark.sh ./test/captures/dhcp.pcap" with
   valgrind-3.12.0.SVN on Debian 9.4 amd64 would yield the following Valgrind
   error:

   ==2416== Thread 2:
   ==2416== Conditional jump or move depends on uninitialised value(s)
   ==2416==    at 0xACB8B22: ws_mempbrk_sse42_compile (ws_mempbrk_sse42.c:58)
   ==2416==    by 0x74F4960: register_all_protocols_worker (register.c:37)
   ==2416==    by 0xB1403D4: g_thread_proxy (gthread.c:784)
   ==2416==    by 0xD438493: start_thread (pthread_create.c:333)
   ==2416==    by 0xB4CAACE: clone (clone.S:97)

   With the change, the above message is gone.  Inspected the disassembly of
   function ws_cpuid, and it looks sane -- just an added "xor ecx, ecx" at the
   top.

Change-Id: I2fb382309cac234c400286a6e9fac7d922912c63
Reviewed-on: https://code.wireshark.org/review/26733
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-05 07:34:01 +00:00
..
cppcheck spdx: more licenses converted. 2018-03-09 04:48:20 +00:00
dftestfiles Rename PCAP files to .pcap; set mime-type appropriately. Should these files be in the test/captures directory? 2013-09-18 14:23:14 +00:00
dftestlib spdx: more licenses converted. 2018-03-07 15:56:44 +00:00
json2pcap More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
lemon lemon: make some functions static. 2018-04-04 10:00:49 +00:00
npl spdx: more licenses converted. 2018-03-07 15:56:44 +00:00
oss-fuzzshark spdx: more licenses converted. 2018-03-07 15:56:44 +00:00
pidl spdx: more licenses converted. 2018-03-09 04:50:23 +00:00
.gitattributes Add simple script to export release tarball right from Git 2014-06-19 00:35:02 +00:00
Get-HardenFlags.ps1 More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
Makefile.am Switch from AsciiDoc to Asciidoctor. 2018-02-11 18:22:09 +00:00
SkinnyProtocolOptimized.xml [skinny]: minor changes to xml file 2017-08-21 15:28:02 +00:00
WiresharkXML.py spdx: more licenses converted. 2018-03-09 04:50:23 +00:00
asn2deb spdx: more licenses converted. 2018-03-07 15:56:44 +00:00
asn2wrs.py spdx: more licenses converted. 2018-03-09 04:50:23 +00:00
checkAPIs.pl spdx: more licenses converted. 2018-03-07 15:56:44 +00:00
checkfiltername.pl F5ETHTRAILER: Initial cleanup from submission 2018-03-11 15:08:16 +00:00
checkhf.pl spdx: more licenses converted. 2018-03-07 15:56:44 +00:00
checklicenses.py spdx: more licenses converted. 2018-03-09 04:50:23 +00:00
colorfilters2js.pl spdx: more licenses converted. 2018-03-07 15:56:44 +00:00
commit-msg spdx: more licenses converted. 2018-03-09 04:48:20 +00:00
compare-abis.sh More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
compress-pngs.sh spdx: more licenses converted. 2018-03-09 04:50:23 +00:00
convert-proto-tree-new.awk Remove $Id$ and other Subversion leftovers from the tools. 2014-02-14 01:35:57 +00:00
convert_expert_add_info_format.pl spdx: more licenses converted. 2018-03-07 15:56:44 +00:00
convert_proto_tree_add_text.pl spdx: more licenses converted. 2018-03-07 15:56:44 +00:00
debian-nightly-package.sh More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
debian-setup.sh More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
delete_includes.py More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
dfilter-test.py spdx: more licenses converted. 2018-03-07 15:56:44 +00:00
extract_asn1_from_spec.pl extract_asn1_from_spec.pl: fix parsing of END tag 2018-04-04 17:52:47 +00:00
fix-encoding-args.pl spdx: more licenses converted. 2018-03-07 15:56:44 +00:00
fixhf.pl spdx: more licenses converted. 2018-03-07 15:56:44 +00:00
ftsanity.py More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
fuzz-test.sh More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
gen-bugnote spdx: more licenses converted. 2018-03-09 04:48:20 +00:00
generate-bacnet-vendors.py spdx: more licenses converted. 2018-03-09 04:50:23 +00:00
generate-nl80211-fields.py More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
generate-sysdig-event.py More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
generate_authors.pl spdx: more licenses converted. 2018-03-07 15:56:44 +00:00
git-compare-abis.sh More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
git-export-release.sh CMake: Add an rpm-package target. 2018-03-26 14:00:35 +00:00
gtk.suppression tools: add a Gtk/GNOME suppression file. 2017-02-02 12:42:01 +00:00
html2text.py html2text: Wrap at 72 characters. 2018-03-20 15:46:08 +00:00
idl2deb spdx: more licenses converted. 2018-03-07 15:56:44 +00:00
idl2wrs Remove $Id$ and other Subversion leftovers from the tools. 2014-02-14 01:35:57 +00:00
indexcap.py More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
install_rpms_for_devel.sh More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
lex.py spdx: more licenses converted. 2018-03-09 04:48:20 +00:00
licensecheck.pl licensecheck: handle multiple licenses. 2018-03-09 11:50:15 +00:00
list_protos_in_cap.sh More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
macos-setup-brew.sh More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
macos-setup.sh More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
make-manuf make-manuf: Fix a comment. 2017-10-29 18:25:31 +00:00
make-pixbuf-csource.pl spdx: more licenses converted. 2018-03-07 15:56:44 +00:00
make-plugin-reg.py L16_mono: Add L16 monaural codec plugin as functional example 2018-02-28 12:04:29 +00:00
make-services.py More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
make-sminmpec.pl spdx: more licenses converted. 2018-03-07 15:56:44 +00:00
make-tls-ct-logids.py TLS: append Log name for CT Log IDs 2017-03-10 02:38:14 +00:00
make-usb.py caputils/tools: more SPDX convertions. 2018-02-09 15:20:05 +00:00
make_charset_table.c Use %zu, not %zd, to print a size_t value (%zd would be for ssize_t). 2015-06-06 19:20:19 +00:00
msnchat spdx: more licenses converted. 2018-03-09 04:50:23 +00:00
msvc2015AdminDeployment.xml WSDG: Improve VS2015 chocolatey install 2017-11-17 12:56:52 +00:00
ncp2222.py spdx: more licenses converted. 2018-03-07 15:56:44 +00:00
netscreen2dump.py spdx: more licenses converted. 2018-03-09 04:50:23 +00:00
parse_xml2skinny_dissector.py More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
pkt-from-core.py More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
pre-commit Pre-commit: Don't force whitespace checks everywhere. 2018-01-04 21:32:27 +00:00
pre-commit-ignore.conf Transition from GeoIP Legacy to MaxMindDB. 2018-03-06 18:02:21 +00:00
pre-commit-ignore.py More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
process-x11-fields.pl Remove popcount in favor of ws_count_ones. 2018-03-13 17:18:01 +00:00
process-x11-xcb.pl Remove popcount in favor of ws_count_ones. 2018-03-13 17:18:01 +00:00
randpkt-test.sh randpkt-test: Fix our optstring 2016-10-05 18:35:44 +00:00
rdps.py more SPDX convertions. 2018-02-13 13:57:30 +00:00
release-update-debian-soversions.sh More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
rpm_setup.sh More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
test-captures.sh More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
test-common.sh More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
textify.ps1 More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
update-tx Qt: Translate files in subdirectories. 2018-01-21 20:16:58 +00:00
usb-ptp-extract-models.pl spdx: more licenses converted. 2018-03-07 15:56:44 +00:00
usb-ptp-extract-models.txt
valgrind-wireshark.sh More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
validate-diameter-xml.sh More licenses converted to SPDX. 2018-03-07 13:35:49 +00:00
vg-suppressions Tweak ws_cpuid so that Valgrind is happy. 2018-04-05 07:34:01 +00:00
win-setup.ps1 Windows: use c-ares 1.14.0 2018-03-16 10:05:04 +00:00
wireshark_be.py spdx: more licenses converted. 2018-03-09 04:50:23 +00:00
wireshark_gen.py spdx: more licenses converted. 2018-03-07 15:56:44 +00:00
ws-coding-style.cfg We now support C++/C99-style comments. 2016-09-06 02:44:32 +00:00
yacc.py spdx: more licenses converted. 2018-03-09 04:48:20 +00:00