Commit Graph

1491 Commits

Author SHA1 Message Date
6a0214b132 ProtoStream: member variable -> local var
The contained state is not used over function boundaries anyways.
Found by Coverity Scan, CID 25689.

Change-Id: I34e42c227710be4859f6d62de9311c4201ed29b0
2015-02-07 18:20:39 +01:00
e99e4aafa8 JobServer: initialize sockaddr_in
This most probably is not a real problem, but does not take much work
to fix.  Found by Coverity Scan, in several reports.

Change-Id: I8bd12e3f7afeb4b1c4e1b057bdbd95da9aa9211c
2015-02-07 18:20:39 +01:00
8c2b6cf028 JobServer: fix socket leaks
Found by Coverity Scan, CID 25600.

Change-Id: Ic0c549928ce8058c145d178ed06b41b543676460
2015-02-07 18:20:30 +01:00
b01a5e80fd import-trace: initialize all members
This was never a real problem, but keeps us on the safe side.  Found
by Coverity Scan, CID 25731/25808/25817.

Change-Id: Ie4bd9fb52ff6140ce7ae024738b43c82f6f5045c
2015-02-07 17:29:53 +01:00
41a191eeaa import-trace: fix SQL value list termination
This fixes the (never intendedly occurring) case that no comma is
found in the SQL value list, and aligns the termination code with the
comment next to it.  Found by Coverity Scan, CID 25653.

Change-Id: I98062748458a50603cd63a9017acd94eef0753f9
2015-02-07 17:29:52 +01:00
8e5cd0d632 import-trace: check 2nd cmd.parse() return value
As the first cmd.parse() call was already checked before, parsing a
second time should never fail.  Nevertheless, we can look at the
return value without much effort.  Found by Coverity Scan, CID 25509.

Change-Id: I58466f5d123da2b541a6a88b72bafa1f754a581e
2015-02-07 17:29:50 +01:00
2c6aa6cd37 ElfReader: fix conditional free
buff cannot be zero.  Found by Coverity Scan, CID 25712.

Change-Id: Ibb411be376aab13832e3e5593fe001df1cbfc051
2015-02-07 17:29:48 +01:00
975d4de90d ecos: detect potential ftell failure
ftell() potentially fails and returns -1.  Found by Coverity Scan,
CID 25546.

Change-Id: Ifcf6fa8593cb1f3f54dbbff27ac021d46468a40c
2015-02-07 17:29:46 +01:00
a19eb6db74 DwarfReader: fix premature fd close
When Richard decided we need not yet give up when dwarf_srclines()
fails, he left a -- now premature -- close(fd) behind.  Found by
Coverity Scan, CID 25806.

Change-Id: I0bc0cb6796225c9efaf5290e2799b6814f88e5b4
2015-02-07 17:29:44 +01:00
0e305034e9 Disassembler: restore ostream state after changing it
Found by Coverity Scan, CID 25679.

Change-Id: Ia0c175cd79ddc42ab9154c667db0d647618e41e2
2015-02-07 17:29:42 +01:00
141cefbaf4 DatabaseProtobufAdapter: remove unused struct field
Found by Coverity Scan, CID 25685.

Change-Id: Id7c9d756a7f824af41d1315740f7415f021eaa91
2015-02-07 17:29:41 +01:00
c499292e2f DatabaseProtobufAdapter: init top-level type bridge
Found by Coverity Scan, CID 25724.

Change-Id: I30ab9251bd0b6c60a64075a5cf934f40874a7c6c
2015-02-07 17:29:40 +01:00
26076d070c DatabaseProtobufAdapter: fix uninitialized members
Found by Coverity Scan, CID 25694.

Change-Id: I8fbb1434b73dcecb16675da870e73f1ad39391e4
2015-02-07 17:29:38 +01:00
0047919644 Database: fix tmp array deletion
Found by Coverity Scan, CID 25544.

Change-Id: Iaf0866ebd4a458fabfe79336d8c8b639e42147c5
2015-02-07 17:29:37 +01:00
cf6b481d5e DatabaseExperiment: fix uninitialized variable
Found by Coverity Scan, CID 25741.

Change-Id: I6105fe76afbfe0a6ec76b59778214683d7d754e2
2015-02-07 17:29:35 +01:00
a7184af37b core/sal: uninitialized BochsController member
False positive, nevertheless worth fixing.  Found by Coverity Scan,
CID 25723.

Change-Id: Ia4f1eb033d7cc8c20889280a59d8973ecf768933
2015-02-07 17:29:34 +01:00
61038c2578 core/sal: fix CPUState bracing error
This is why our coding style suggests braces even for single-line "if"
or loop bodies.  Found by Coverity Scan, CID 25767.

Change-Id: I53062286accba7c0fc9795ecea0a5e2795443321
2015-02-07 17:29:32 +01:00
fe9e25374a CampaignManager: initialize campaign member
Found by Coverity Scan, CID 25798.

Change-Id: Ib310ca3198c78a8e01d044d90ada1cd0c22b26d6
2015-02-07 17:29:29 +01:00
bae03bc929 cmake: build with -D__NO_MATH_INLINES
To use the new clang-based AspectC++ (ac++ >1.2), Fail* must be built
with -D__NO_MATH_INLINES (or --c_compiler clang++).

Change-Id: I020d62891946d09ac456b8df914b669ab33ab0e2
2015-02-05 17:25:09 +01:00
6995dffca8 prune-trace: --no-weighting for SamplingPruner
Analogous to the FESamplingPruner, the --no-weighting switch disables the
equivalence-class weighting by using a weight of one instead of the
equivalence-class size.  This is usually not a good idea, and should only
be used for demonstration purposes, or if the fault model requires
weight-less sampling.

The --no-weighting switch was introduced with an earlier commit, but
did not have an effect until now.

Change-Id: If2ebf775bea7f2e3f8c293abbae08f1eb00cacf1
2015-02-02 13:50:59 +01:00
1dcd4fbeb2 fail-cleanup-db.sh: cleanup "symbol" table as well
(The "symbol" is currently only created by some inofficial scripts,
but may become part of the Fail* core at some point.)

Change-Id: If0b3e6cdd6b6ca865abb67382de128e7a27f19ab
2015-01-30 13:28:33 +01:00
b8c03bca8d fail-env: assign -> use default values
In bash, ${parameter:=word} assigns the default value.  In our case,
${parameter:-word} (the whole expression has a default value, but it's
not assigned) suffices.

Change-Id: I5f4105b973892aa13943d660cbebaed76fd43752
2015-01-29 16:43:22 +01:00
add9b80a1a copyright update for 2015
Change-Id: I001d03c09fe13ef5b5783620bfa3fd160b9c475c
2015-01-23 15:30:56 +01:00
412ecbba63 dbcampaign: skip existing pilots with wrong fspmethod
Loading existing pilots with a different fspmethod_id is a waste of
time.

Change-Id: I3519a14822029999fa2ed854daff9853c0cbeec1
2015-01-21 14:53:33 +01:00
d58694521c dbcampaign: don't include fspmethod/variant ID in job msg
These IDs don't make sense by themselves but only after a lookup in the
database, which clients usually don't have (and don't need) access to.

Conflicts:
	src/core/comm/DatabaseCampaignMessage.proto.in

Change-Id: Ice739463552039b7fb48581722ea2e05984cea47
2015-01-21 14:53:32 +01:00
c422911741 dbcampaign: allow wildcard for prune method
Using mixed pruning methods now does not require to run the campaign
server twice anymore.

Change-Id: I3f62c269166b750892bb0e659ad0c180425d1479
2015-01-21 14:53:32 +01:00
336ffd6453 Merge branch 'sampling'
Change-Id: Id6be7954b0bafcbfd64ba702e69e016bd2810115
2015-01-21 14:53:28 +01:00
39df0a979e Merge branch 'listener-perf-bug'
Change-Id: Ia863115ec31011ad2b7a954543c8ee64188d3d32
2015-01-21 14:52:33 +01:00
4cbcf30b7c prune-trace: incremental mode for SamplingPruner
The --incremental switch allows to add more samples if the resulting
confidence intervals are not satisfactory yet.

Change-Id: I65dc99522f45f8a4eaf4ce68e832f7636585381d
2015-01-21 00:22:36 +01:00
79211fd31d prune-trace: add SamplingPruner
The SamplingPruner implements "normal" sampling with equivalence-class
reuse.  Unlike the FESamplingPruner, the SamplingPruner implements
uniform fault-space sampling that counts multiple hits of an
equivalence class.

This change modifies the database schema, more specifically it adds
the "weight" column to the fspgroup table.  Update existing databases
with this query:

  ALTER TABLE fspgroup ADD COLUMN weight INT UNSIGNED;

Change-Id: I668fc9b25fc4d79a60aa1ef8d69cdf5fa076cc6d
2015-01-21 00:22:36 +01:00
99a923b11e Merge remote-tracking branch 'origin/master' into sampling-wip
Change-Id: Iae5c02be5801d75e8adc55222ccb35c559f7ebf4
2015-01-21 00:22:28 +01:00
f8e0f1bb3f util: add SumTree::iterator
Change-Id: I8304b64634fa3ab92a126fe5d942674b26334b3d
2015-01-21 00:17:48 +01:00
2f70e05db6 util: rename SumTree::get -> remove, add r/o get
SumTree::get now non-intrusively picks an element and returns a
reference to it, SumTree::remove removes and returns a copy.  The
former is needed for sampling with replacement.

Change-Id: Iefef2fdf0b7df6ea7a9949f2588528ec9e86bb7a
2015-01-21 00:17:48 +01:00
b0c58bab78 util: SumTree::add() documentation
This function copies the reference argument 'element' internally.

Change-Id: I33d94f224bc2b1b89057b90258d500eaa364ab85
2015-01-21 00:17:48 +01:00
f23860c139 prune-trace: use uint64_t for pilot counts
This enables using very large data sets in the FESamplingPruner.

Change-Id: Ibf097ed8cec24c85a74e83a78d79aa07893cfa8c
2015-01-21 00:17:48 +01:00
ed18399ff6 prune-trace: remove invalid assertion
This assertion in the FESamplingPruner is invalid if the import took
place without "write" ECs.

Change-Id: I7d1bbcf1572573e2ac97e9be1191fbf9fe61f755
2015-01-21 00:17:48 +01:00
57e4541190 prune-trace: do not sort ECs for sampling
Sorting is too costly for large data sets, and not worth the
sampling-process speedup.

Change-Id: I622ff3ed9b352fc5c7586f9733d830be727b6a11
2015-01-21 00:17:48 +01:00
b2b53380f4 prune-trace: add switch to disable sample weighting
In the sampling step, the --no-weighting switch disables the
equivalence-class weighting by using a weight of one instead of the
equivalence-class size.  This is usually not a good idea, and should
only be used for demonstration purposes, or if the fault model
requires weight-less sampling.

Change-Id: Id903d1924c6ecbcd217815aa5ce9271560130071
2015-01-21 00:14:45 +01:00
a1e3b31cd5 prune-trace: sample from known results
The --use-known-results switch simulates sampling (with fault
expansion, FESamplingPruner) by reusing results from a previous
campaign covering the full fault space (that used the "basic" pruner).
The pruner only creates entries in the "fspgroup" table that refer to
already existing pilots and corresponding results.

This switch is not for normal Fail* use, but only for experimenting
with the FESamplingPruner.

Change-Id: I1bf561d93f55918d243c5306551a1c6b48027198
2015-01-21 00:09:37 +01:00
d9028e9d70 CMake: Fail* version number handling fixed
The project version number is now not user-editable anymore, and
custom values get overwritten by force.  Without this change,
CMakeCache.txt stays at the version number it was first instantiated
from.

Change-Id: If9ad1549937dad98db9a0f0eda16ef752e7d74aa
2015-01-14 10:27:20 +01:00
fd6bd279ad Merge "util/DwarfReader: plug file-descriptor leaks" 2015-01-14 10:27:01 +01:00
a00c4d9a69 util/DwarfReader: plug file-descriptor leaks
This change fixes several file-descriptor leaks in the DwarfReader
implementation.  The patch is taken from Richard Hellwig's not yet
merged change I161f626d12ca7f2b7b9d13ba9cbc254eb55692f1.  I did not
apply any white-space cleanups to prevent conflicts when Richard's
change will be merged later.

Change-Id: Icd9c1bdeeab39e77900e2ce88b756a8cf7ade96a
2015-01-14 10:15:29 +01:00
d68ea990ca sal: catch listener removal corner case
This change makes sure an active but not-yet fired listener does not fire
anymore if it gets removed.  In this case, the listener already has an
invalid index, but still needs to be copied to the delete list.

This issue has not been observed in the wild, and is unlikely to have
caused real problems in the past.

Change-Id: I8be8a5b1d4cdc783a092b93f34f33b969894e5da
2015-01-13 19:22:49 +01:00
c4d44aeb0c sal: fix watch/breakpoint perf implementation
This commit changes the entities in a ResultSet from listener indexes
(into ListenerManagers m_BufferList) to BaseListener pointers, as
ListenerManager::makeActive(BaseListener*) (called from
FastBreakpoints/Watchpoints.ah) may invalidate indexes temporarily
stored in a ResultSet.  The issue occurs when multiple breakpoints
(watchpoints) fire at the same time, and one added more recently than
the others occupies the largest index position in m_BufferList.

Although this issue is extremely rare and was only observed in a few
corner cases up to now, it may have falsified results in the past.

Change-Id: I7b788a06d412f15700ca75f56f2be5d3b78465fa
2015-01-13 19:22:49 +01:00
32e8a679b5 CMake: Fail* version number handling fixed
The project version number is now not user-editable anymore, and
custom values get overwritten by force.  Without this change,
CMakeCache.txt stays at the version number it was first instantiated
from.

Change-Id: If9ad1549937dad98db9a0f0eda16ef752e7d74aa
2015-01-13 14:48:22 +01:00
722715c01f fail-cleanup-db.sh: cleanup unused DB entries
This script removes dangling rows from the database, for example
'trace' entries with a variant_id not mentioned in the 'variants'
table, or result rows referencing a nonexistent 'fsppilot' entry.
IOW, this script enforces referential integrity as it would be
maintained by foreign key constraints (that can only be used with
InnoDB tables).

Change-Id: I4dce1e46277d470f8c3eca31447ca71f63c6353f
2015-01-12 16:45:38 +01:00
80da913264 README: publications update
Change-Id: I4794dbba1e1fc28398bd040a5ffbc4ff821e5a6c
2015-01-11 18:47:37 +01:00
88dff29415 Merge branch 'visualfail' 2015-01-10 00:49:52 +01:00
62c3cc7f20 visualfail: README, pristine configuration
Change-Id: Ic7e3ec0e28fdd368b9207c7a843a3f397e5e3c09
2015-01-09 15:00:03 +01:00
f0a4dacd87 visualfail: remove common path prefix from file names
Change-Id: I5806f0e4ca3ebe4e9aae3423e04d8ffb36fff2a6
2015-01-09 15:00:03 +01:00