Fuzz introspector
For issues and ideas: https://github.com/ossf/fuzz-introspector/issues

Project functions overview

The following table shows data about each function in the project. The functions included in this table correspond to all functions that exist in the executables of the fuzzers. As such, there may be functions that are from third-party libraries.

For further technical details on the meaning of columns in the below table, please see the Glossary .

Func name Functions filename Args Function call depth Reached by Fuzzers Runtime reached by Fuzzers Combined reached by Fuzzers Fuzzers runtime hit Func lines hit % I Count BB Count Cyclomatic complexity Functions reached Reached by functions Accumulated cyclomatic complexity Undiscovered complexity

Fuzzer details

Fuzzer: fuzz_layout

Call tree

The calltree shows the control flow of the fuzzer. This is overlaid with coverage information to display how much of the potential code a fuzzer can reach is in fact covered at runtime. In the following there is a link to a detailed calltree visualisation as well as a bitmap showing a high-level view of the calltree. For further information about these topics please see the glossary for full calltree and calltree overview

Call tree overview bitmap:

The distribution of callsites in terms of coloring is
Color Runtime hitcount Callsite count Percentage
red 0 965 48.2%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 1035 51.7%
All colors 2000 100

Fuzz blockers

The following nodes represent call sites where fuzz blockers occur.

Amount of callsites blocked Calltree index Parent function Callsite Largest blocked function
134 1669 facebook::yoga::layoutAbsoluteChild(facebook::yoga::Node const*, facebook::yoga::Node const*, facebook::yoga::Node*, float, float, facebook::yoga::SizingMode, facebook::yoga::Direction, facebook::yoga::LayoutData&, unsigned int, unsigned int) call site: 01669 _ZN8facebook4yoga9isDefinedITkNSt3__114floating_pointEfEEbT_
110 1418 facebook::yoga::calculateLayoutImpl(facebook::yoga::Node*, float, float, facebook::yoga::Direction, facebook::yoga::SizingMode, facebook::yoga::SizingMode, float, float, bool, facebook::yoga::LayoutPassReason, facebook::yoga::LayoutData&, unsigned int, unsigned int) call site: 01418 _ZN8facebook4yoga12maxOrDefinedITkNSt3__114floating_pointEfTkNS2_14floating_pointEfEEDaT_T0_
107 1804 facebook::yoga::justifyAbsoluteChild(facebook::yoga::Node const*, facebook::yoga::Node*, facebook::yoga::Direction, facebook::yoga::FlexDirection, float) call site: 01804 _ZN8facebook4yoga13to_underlyingITkNS0_11EnumerationENS0_4EdgeEEEDaT_
91 1092 facebook::yoga::resolveFlexibleLength(facebook::yoga::Node*, facebook::yoga::FlexLine&, facebook::yoga::FlexDirection, facebook::yoga::FlexDirection, facebook::yoga::Direction, float, float, float, float, float, float, bool, facebook::yoga::SizingMode, bool, facebook::yoga::LayoutData&, unsigned int, unsigned int) call site: 01092 _ZN8facebook4yoga12maxOrDefinedITkNSt3__114floating_pointEfTkNS2_14floating_pointEfEEDaT_T0_
32 1336 facebook::yoga::calculateBaseline(facebook::yoga::Node const*) call site: 01336 _ZN8facebook4yoga12maxOrDefinedITkNSt3__114floating_pointEfTkNS2_14floating_pointEfEEDaT_T0_
26 550 facebook::yoga::Node::setLayoutMeasuredDimension(float, facebook::yoga::Dimension) call site: 00550 _ZN8facebook4yoga12maxOrDefinedITkNSt3__114floating_pointEfTkNS2_14floating_pointEfEEDaT_T0_
20 1562 facebook::yoga::calculateLayoutImpl(facebook::yoga::Node*, float, float, facebook::yoga::Direction, facebook::yoga::SizingMode, facebook::yoga::SizingMode, float, float, bool, facebook::yoga::LayoutPassReason, facebook::yoga::LayoutData&, unsigned int, unsigned int) call site: 01562
19 577 facebook::yoga::cleanupContentsNodesRecursively(facebook::yoga::Node*, bool) call site: 00577 YGNodeClone
18 385 facebook::yoga::roundValueToPixelGrid(double, double, bool, bool) call site: 00385 _ZN8facebook4yoga9isDefinedITkNSt3__114floating_pointEfEEbT_
14 35 facebook::yoga::Node::Node(facebook::yoga::Config const*) call site: 00035 __clang_call_terminate
14 597 facebook::yoga::Node::cloneChildrenIfNeeded() call site: 00597
12 16 facebook::yoga::StyleValueHandle::ofAuto() call site: 00016

Runtime coverage analysis

Covered functions
290
Functions that are reachable but not covered
174
Reachable functions
719
Percentage of reachable functions covered
75.8%
NB: The sum of covered functions and functions that are reachable but not covered need not be equal to Reachable functions . This is because the reachability analysis is an approximation and thus at runtime some functions may be covered that are not included in the reachability analysis. This is a limitation of our static analysis capabilities.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
/src/yoga/fuzz/FuzzLayout.cpp 3
/src/yoga/yoga/YGConfig.cpp 2
/src/yoga/yoga/debug/Log.cpp 5
/src/yoga/yoga/../yoga/config/Config.h 3
/src/yoga/yoga/YGNode.cpp 8
/src/yoga/yoga/node/Node.cpp 32
/src/yoga/yoga/../yoga/numeric/FloatOptional.h 13
/src/yoga/yoga/../yoga/style/Style.h 75
/src/yoga/yoga/../yoga/style/StyleValueHandle.h 12
/src/yoga/yoga/../yoga/style/StyleValuePool.h 7
/src/yoga/yoga/../yoga/style/SmallValueBuffer.h 5
/src/yoga/yoga/../yoga/node/LayoutResults.h 17
/src/yoga/yoga/../yoga/style/StyleSizeLength.h 16
/src/yoga/yoga/debug/AssertFatal.cpp 3
/src/yoga/yoga/../yoga/enums/LogLevel.h 1
/src/yoga/yoga/config/Config.cpp 7
/src/yoga/yoga/../yoga/node/Node.h 38
/src/yoga/yoga/../yoga/event/event.h 18
/src/yoga/yoga/event/event.cpp 1
/src/yoga/yoga/YGNodeStyle.cpp 7
/src/yoga/yoga/../yoga/enums/FlexDirection.h 1
/src/yoga/yoga/../yoga/numeric/Comparison.h 9
/src/yoga/yoga/../yoga/enums/Gutter.h 1
/src/yoga/yoga/../yoga/style/StyleLength.h 4
/src/yoga/yoga/../yoga/enums/Direction.h 1
/src/yoga/yoga/algorithm/CalculateLayout.cpp 20
/src/yoga/yoga/../yoga/enums/YogaEnums.h 4
/src/yoga/yoga/../yoga/algorithm/FlexDirection.h 9
/src/yoga/yoga/algorithm/Cache.cpp 4
/src/yoga/yoga/algorithm/PixelGrid.cpp 2
/src/yoga/yoga/../yoga/algorithm/BoundAxis.h 3
/src/yoga/yoga/../yoga/algorithm/SizingMode.h 1
/src/yoga/yoga/../yoga/enums/MeasureMode.h 1
/src/yoga/yoga/../yoga/node/LayoutableChildren.h 15
/src/yoga/yoga/../yoga/algorithm/Align.h 4
/src/yoga/yoga/algorithm/FlexLine.cpp 1
/src/yoga/yoga/../yoga/algorithm/FlexLine.h 1
/src/yoga/yoga/../yoga/enums/Errata.h 1
/src/yoga/yoga/algorithm/Baseline.cpp 2
/src/yoga/yoga/../yoga/algorithm/TrailingPosition.h 3
/src/yoga/yoga/algorithm/AbsoluteLayout.cpp 8

Fuzz engine guidance

This sections provides heuristics that can be used as input to a fuzz engine when running a given fuzz target. The current focus is on providing input that is usable by libFuzzer.

/src/yoga/fuzz/FuzzLayout.cpp

Dictionary

Use this with the libFuzzer -dict=DICT.file flag


Fuzzer function priority

Use one of these functions as input to libfuzzer with flag: -focus_function name

-focus_function=['facebook::yoga::layoutAbsoluteChild(facebook::yoga::Node const*, facebook::yoga::Node const*, facebook::yoga::Node*, float, float, facebook::yoga::SizingMode, facebook::yoga::Direction, facebook::yoga::LayoutData&, unsigned int, unsigned int)', 'facebook::yoga::calculateLayoutImpl(facebook::yoga::Node*, float, float, facebook::yoga::Direction, facebook::yoga::SizingMode, facebook::yoga::SizingMode, float, float, bool, facebook::yoga::LayoutPassReason, facebook::yoga::LayoutData&, unsigned int, unsigned int)', 'facebook::yoga::justifyAbsoluteChild(facebook::yoga::Node const*, facebook::yoga::Node*, facebook::yoga::Direction, facebook::yoga::FlexDirection, float)', 'facebook::yoga::resolveFlexibleLength(facebook::yoga::Node*, facebook::yoga::FlexLine&, facebook::yoga::FlexDirection, facebook::yoga::FlexDirection, facebook::yoga::Direction, float, float, float, float, float, float, bool, facebook::yoga::SizingMode, bool, facebook::yoga::LayoutData&, unsigned int, unsigned int)', 'facebook::yoga::calculateBaseline(facebook::yoga::Node const*)', 'facebook::yoga::Node::setLayoutMeasuredDimension(float, facebook::yoga::Dimension)', 'facebook::yoga::calculateLayoutImpl(facebook::yoga::Node*, float, float, facebook::yoga::Direction, facebook::yoga::SizingMode, facebook::yoga::SizingMode, float, float, bool, facebook::yoga::LayoutPassReason, facebook::yoga::LayoutData&, unsigned int, unsigned int)', 'facebook::yoga::cleanupContentsNodesRecursively(facebook::yoga::Node*, bool)', 'facebook::yoga::roundValueToPixelGrid(double, double, bool, bool)', 'facebook::yoga::Node::Node(facebook::yoga::Config const*)']

Files and Directories in report

This section shows which files and directories are considered in this report. The main reason for showing this is fuzz introspector may include more code in the reasoning than is desired. This section helps identify if too many files/directories are included, e.g. third party code, which may be irrelevant for the threat model. In the event too much is included, fuzz introspector supports a configuration file that can exclude data from the report. See the following link for more information on how to create a config file: link

Files in report

Source file Reached by Covered by
[] []
/src/yoga/yoga/../yoga/style/StyleLength.h ['fuzz_layout'] []
/src/yoga/yoga/../yoga/enums/Justify.h [] []
/src/yoga/yoga/../yoga/style/StyleValuePool.h ['fuzz_layout'] []
/src/yoga/yoga/../yoga/enums/Edge.h [] []
/src/yoga/yoga/../yoga/enums/Align.h [] []
/src/yoga/yoga/../yoga/enums/FlexDirection.h ['fuzz_layout'] []
/src/yoga/yoga/node/Node.cpp ['fuzz_layout'] ['fuzz_layout']
/src/yoga/yoga/../yoga/style/StyleValueHandle.h ['fuzz_layout'] []
/src/yoga/yoga/../yoga/algorithm/Align.h ['fuzz_layout'] []
/src/yoga/yoga/../yoga/algorithm/SizingMode.h ['fuzz_layout'] []
/src/yoga/yoga/algorithm/Baseline.cpp ['fuzz_layout'] ['fuzz_layout']
/src/yoga/yoga/debug/Log.cpp ['fuzz_layout'] ['fuzz_layout']
/src/yoga/yoga/YGNode.cpp ['fuzz_layout'] ['fuzz_layout']
/src/yoga/yoga/../yoga/enums/BoxSizing.h [] []
/src/yoga/yoga/../yoga/enums/YogaEnums.h ['fuzz_layout'] []
/src/yoga/yoga/../yoga/node/LayoutResults.h ['fuzz_layout'] []
/src/yoga/yoga/../yoga/style/GridLine.h [] []
/src/yoga/yoga/../yoga/enums/Gutter.h ['fuzz_layout'] []
/src/yoga/yoga/algorithm/CalculateLayout.cpp ['fuzz_layout'] ['fuzz_layout']
/src/yoga/yoga/../yoga/node/LayoutableChildren.h ['fuzz_layout'] []
/src/yoga/fuzz/FuzzLayout.cpp ['fuzz_layout'] ['fuzz_layout']
/src/yoga/yoga/../yoga/node/Node.h ['fuzz_layout'] []
/src/yoga/yoga/../yoga/event/event.h ['fuzz_layout'] []
/src/yoga/yoga/../yoga/enums/Wrap.h [] []
/src/yoga/yoga/../yoga/enums/NodeType.h [] []
/usr/local/bin/../include/c++/v1/__iterator/move_iterator.h [] []
/src/yoga/yoga/../yoga/enums/Direction.h ['fuzz_layout'] []
/src/yoga/yoga/../yoga/algorithm/FlexLine.h ['fuzz_layout'] []
/src/yoga/yoga/../yoga/style/StyleSizeLength.h ['fuzz_layout'] []
/src/yoga/yoga/YGNodeStyle.cpp ['fuzz_layout'] ['fuzz_layout']
/src/yoga/yoga/../yoga/enums/Display.h [] []
/src/yoga/yoga/../yoga/algorithm/FlexDirection.h ['fuzz_layout'] []
/src/yoga/yoga/event/event.cpp ['fuzz_layout'] ['fuzz_layout']
/src/yoga/yoga/../yoga/algorithm/TrailingPosition.h ['fuzz_layout'] []
/usr/local/bin/../include/c++/v1/stdexcept [] []
/src/yoga/yoga/../yoga/algorithm/BoundAxis.h ['fuzz_layout'] []
/src/yoga/yoga/../yoga/style/GridTrack.h [] []
/src/yoga/yoga/algorithm/AbsoluteLayout.cpp ['fuzz_layout'] ['fuzz_layout']
/src/yoga/yoga/../yoga/config/Config.h ['fuzz_layout'] []
/src/yoga/yoga/../yoga/numeric/FloatOptional.h ['fuzz_layout'] []
/src/yoga/yoga/../yoga/enums/MeasureMode.h ['fuzz_layout'] []
/src/yoga/yoga/../yoga/enums/PositionType.h [] []
/src/yoga/yoga/../yoga/numeric/Comparison.h ['fuzz_layout'] []
/src/yoga/yoga/../yoga/enums/Overflow.h [] []
/src/yoga/yoga/debug/AssertFatal.cpp ['fuzz_layout'] ['fuzz_layout']
/usr/local/bin/../include/c++/v1/__exception/exception.h [] []
/src/yoga/yoga/../yoga/style/SmallValueBuffer.h ['fuzz_layout'] []
/src/yoga/yoga/YGConfig.cpp ['fuzz_layout'] ['fuzz_layout']
/src/yoga/yoga/../yoga/enums/Errata.h ['fuzz_layout'] []
/src/yoga/yoga/../yoga/style/Style.h ['fuzz_layout'] []
/src/yoga/yoga/algorithm/Cache.cpp ['fuzz_layout'] ['fuzz_layout']
/src/yoga/yoga/../yoga/enums/ExperimentalFeature.h [] []
/src/yoga/yoga/algorithm/PixelGrid.cpp ['fuzz_layout'] ['fuzz_layout']
/src/yoga/yoga/../yoga/enums/LogLevel.h ['fuzz_layout'] []
/src/yoga/yoga/config/Config.cpp ['fuzz_layout'] ['fuzz_layout']
/src/yoga/yoga/../yoga/enums/Unit.h [] []
/src/yoga/yoga/algorithm/FlexLine.cpp ['fuzz_layout'] ['fuzz_layout']

Directories in report

Directory
/src/yoga/yoga/../yoga/algorithm/
/src/yoga/yoga/../yoga/enums/
/src/yoga/yoga/algorithm/
/src/yoga/yoga/event/
/src/yoga/yoga/node/
/src/yoga/yoga/config/
/src/yoga/yoga/../yoga/style/
/src/yoga/yoga/../yoga/node/
/src/yoga/yoga/
/src/yoga/yoga/../yoga/numeric/
/src/yoga/yoga/../yoga/event/
/src/yoga/fuzz/
/usr/local/bin/../include/c++/v1/__iterator/
/src/yoga/yoga/../yoga/config/
/usr/local/bin/../include/c++/v1/__exception/
/usr/local/bin/../include/c++/v1/
/src/yoga/yoga/debug/