From 7e6670263c3a42dfe70a4e97009f25259d7f6a4c Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sat, 28 Oct 2017 18:46:05 +0200 Subject: simpler structure -- compilers and flags have to be given externally --- CMakeLists.txt | 14 +- testfiles/CMakeLists.txt | 9 +- testfiles/fuzz-dict | 521 ----------------------------------------------- testfiles/fuzzer.dict | 521 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 527 insertions(+), 538 deletions(-) delete mode 100644 testfiles/fuzz-dict create mode 100644 testfiles/fuzzer.dict diff --git a/CMakeLists.txt b/CMakeLists.txt index 3293e872b..b01956876 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -106,6 +106,7 @@ option(WITH_NLS "Compile with Native Language Support (using gettext)" ON) option(WITH_YAML "Compile with YAML support (enables xverbs)" ON) option(WITH_FUZZ "Compile for fuzzing purpose (use 'make fuzz' only)" OFF) +mark_as_advanced(WITH_FUZZ) option(ENABLE_BINRELOC "Enable relocatable binaries" OFF) @@ -154,19 +155,6 @@ endif() # ----------------------------------------------------------------------------- -# ----------------------------------------------------------------------------- -# Fuzzing -# ----------------------------------------------------------------------------- - -mark_as_advanced(WITH_FUZZ) -if(WITH_FUZZ) - add_definitions("-fsanitize=address"#,undefined,signed-integer-overflow - "-fsanitize-coverage=edge,trace-pc-guard,indirect-calls,trace-cmp,trace-div,trace-gep" - "-fno-omit-frame-pointer") - set(CMAKE_C_COMPILER /usr/bin/clang) - set(CMAKE_CXX_COMPILER /usr/bin/clang++) -endif() - # ----------------------------------------------------------------------------- # Relocatable Binary # ----------------------------------------------------------------------------- diff --git a/testfiles/CMakeLists.txt b/testfiles/CMakeLists.txt index 5dba0258b..923898fc3 100644 --- a/testfiles/CMakeLists.txt +++ b/testfiles/CMakeLists.txt @@ -34,8 +34,9 @@ add_subdirectory(rendering_tests) if(WITH_FUZZ) add_executable(fuzz fuzzer.cpp) - target_link_libraries(fuzz inkscape_base -lFuzzer "-fsanitize=address" - "-fsanitize-coverage=edge,trace-pc-guard,indirect-calls,trace-cmp,trace-div,trace-gep" - "-fno-omit-frame-pointer") - + if(EXISTS ${LIB_FUZZING_ENGINE}) + target_link_libraries(fuzz inkscape_base -lFuzzingEngine) + else() + target_link_libraries(fuzz inkscape_base -lFuzzer) + endif() endif() diff --git a/testfiles/fuzz-dict b/testfiles/fuzz-dict deleted file mode 100644 index 7eee0d0a0..000000000 --- a/testfiles/fuzz-dict +++ /dev/null @@ -1,521 +0,0 @@ -"100" -"200" -"300" -"400" -"500" -"600" -"700" -"800" -"900" -"a" -"accent-height" -"accumulate" -"additive" -"after-edge" -"alignment-baseline" -"all" -"alphabetic" -"altGlyph" -"altGlyphDef" -"altGlyphItem" -"amplitude" -"animate" -"animateColor" -"animateMotion" -"animateTransform" -"arabic-form" -"ascent" -attr_encoding=" encoding=\"1\"" -attr_generic=" a=\"1\"" -attr_href=" href=\"1\"" -"attributeName" -"attributeType" -attr_standalone=" standalone=\"no\"" -attr_version=" version=\"1\"" -attr_xml_base=" xml:base=\"1\"" -attr_xml_id=" xml:id=\"1\"" -attr_xml_lang=" xml:lang=\"1\"" -attr_xmlns=" xmlns=\"1\"" -attr_xml_space=" xml:space=\"1\"" -"auto" -"azimuth" -"baseFrequency" -"baseline" -"baseline-shift" -"baseProfile" -"bbox" -"before-edge" -"begin" -"bevel" -"bias" -"bidi-override" -"blink" -"block" -"bold" -"bolder" -"butt" -"by" -"calcMode" -"cap-height" -"caption" -"central" -"circle" -"class" -"clip" -"clip-path" -"clipPath" -"clipPathUnits" -"clip-rule" -"collapse" -"color" -"color-interpolation" -"color-interpolation-filters" -"color-profile" -"color-rendering" -"compact" -"condensed" -"contentScriptType" -"contentStyleType" -"crispEdges" -"crosshair" -"currentColor" -"cursor" -"cx" -"cy" -"d" -"default" -"defs" -"desc" -"descent" -"diffuseConstant" -"direction" -"display" -"divisor" -"dominant-baseline" -"dur" -"dx" -"dy" -"edgeMode" -"elevation" -"ellipse" -"embed" -"enable-background" -"end" -entity_builtin="<" -entity_decimal="" -entity_external="&a;" -entity_hex="" -"e-resize" -"evenodd" -"expanded" -"exponent" -"externalResourcesRequired" -"extra-condensed" -"extra-expanded" -"feBlend" -"feColorMatrix" -"feComponentTransfer" -"feComposite" -"feConvolveMatrix" -"feDiffuseLighting" -"feDisplacementMap" -"feDistantLight" -"feFlood" -"feFuncA" -"feFuncB" -"feFuncG" -"feFuncR" -"feGaussianBlur" -"feImage" -"feMerge" -"feMergeNode" -"feMorphology" -"feOffset" -"fePointLight" -"feSpecularLighting" -"feSpotLight" -"feTile" -"feTurbulence" -"fill" -"fill-opacity" -"fill-rule" -"filter" -"filterRes" -"filterUnits" -"flood-color" -"flood-opacity" -"font" -"font-face" -"font-face-format" -"font-face-name" -"font-face-src" -"font-face-uri" -"font-family" -"font-size" -"font-size-adjust" -"font-stretch" -"font-style" -"font-variant" -"font-weight" -"foreignObject" -"format" -"from" -"fx" -"fy" -"g" -"g1" -"g2" -"geometricPrecision" -"glyph" -"glyph-name" -"glyph-orientation-horizontal" -"glyph-orientation-vertical" -"glyphRef" -"gradientTransform" -"gradientUnits" -"hanging" -"height" -"help" -"hidden" -"hkern" -"horiz-adv-x" -"horiz-origin-x" -"horiz-origin-y" -"icon" -"id" -"ideographic" -"image" -"image-rendering" -"in" -"in2" -"individual" -"inherit" -"inline" -"inline-table" -"intercept" -"italic" -"k" -"k1" -"k2" -"k3" -"k4" -"kernelMatrix" -"kernelUnitLength" -"kerning" -"keyPoints" -"keySplines" -"keyTimes" -"lang" -"lengthAdjust" -"letter-spacing" -"lighter" -"lighting-color" -"limitingConeAngle" -"line" -"linearGradient" -"linearRGB" -"'line-height'" -"line-through" -"list-item" -"local" -"lr" -"lr-tb" -"ltr" -"marker" -"marker-end" -"markerHeight" -"marker-mid" -"marker-start" -"markerUnits" -"markerWidth" -"mask" -"maskContentUnits" -"maskUnits" -"mathematical" -"max" -"media" -"menu" -"message-box" -"metadata" -"method" -"middle" -"min" -"missing-glyph" -"miter" -"mode" -"move" -"mpath" -"name" -"narrower" -"ne-resize" -"new" -"no-change" -"none" -"nonzero" -"normal" -"n-resize" -"numOctaves" -"nw-resize" -"oblique" -"offset" -"onabort" -"onactivate" -"onbegin" -"onclick" -"onend" -"onerror" -"onfocusin" -"onfocusout" -"onload" -"onmousedown" -"onmousemove" -"onmouseout" -"onmouseover" -"onmouseup" -"onrepeat" -"onresize" -"onscroll" -"onunload" -"onzoom" -"opacity" -"operator" -"optimizeLegibility" -"optimizeQuality" -"optimizeSpeed" -"order" -"orient" -"orientation" -"origin" -"overflow" -"overline" -"overline-position" -"overline-thickness" -"paint" -"painted" -"panose-1" -"path" -"pathLength" -"pattern" -"patternContentUnits" -"patternTransform" -"patternUnits" -"pointer" -"pointer-events" -"points" -"pointsAtX" -"pointsAtY" -"pointsAtZ" -"polygon" -"polyline" -"preserveAlpha" -"preserveAspectRatio" -"primitiveUnits" -"properties" -"r" -"radialGradient" -"radius" -"rect" -"refX" -"refY" -"rendering-intent" -"repeatCount" -"repeatDur" -"requiredExtensions" -"requiredFeatures" -"reset-size" -"restart" -"result" -"rl" -"rl-tb" -"rotate" -"round" -"rtl" -"run-in" -"rx" -"ry" -"scale" -"script" -"scroll" -"see" -"seed" -"semi-condensed" -"semi-expanded" -"se-resize" -"set" -"shape-rendering" -"slope" -"small-caps" -"small-caption" -"spacing" -"Specifying" -"specularConstant" -"specularExponent" -"spreadMethod" -"square" -"s-resize" -"sRGB" -"start" -"startOffset" -"status-bar" -"stdDeviation" -"stemh" -"stemv" -"stitchTiles" -"stop" -"stop-color" -"stop-opacity" -"strikethrough-position" -"strikethrough-thickness" -"string" -string_any="ANY" -string_brackets="[]" -string_cdata="CDATA" -string_col_fallback=":fallback" -string_col_generic=":a" -string_col_include=":include" -string_dashes="--" -string_empty_dblquotes="\"\"" -string_empty="EMPTY" -string_empty_quotes="''" -string_entities="ENTITIES" -string_entity="ENTITY" -string_fixed="#FIXED" -string_id="ID" -string_idref="IDREF" -string_idrefs="IDREFS" -string_implied="#IMPLIED" -string_nmtoken="NMTOKEN" -string_nmtokens="NMTOKENS" -string_notation="NOTATION" -string_parentheses="()" -string_pcdata="#PCDATA" -string_percent="%a" -string_public="PUBLIC" -string_required="#REQUIRED" -string_schema=":schema" -string_system="SYSTEM" -string_ucs4="UCS-4" -string_utf16="UTF-16" -string_utf8="UTF-8" -string_xmlns="xmlns:" -"stroke" -"stroke-dasharray" -"stroke-dashoffset" -"stroke-linecap" -"stroke-linejoin" -"stroke-miterlimit" -"stroke-opacity" -"stroke-width" -"style" -"sub" -"super" -"surfaceScale" -"svg" -"switch" -"sw-resize" -"symbol" -"systemLanguage" -"table" -"table-caption" -"table-cell" -"table-column" -"table-column-group" -"table-footer-group" -"table-header-group" -"table-row" -"table-row-group" -"tableValues" -tag_attlist="" -tag_doctype="" -tag_open_close="" -tag_open_exclamation="" -tag_xml_q="" -"target" -"targetX" -"targetY" -"tb" -"tb-rl" -"text" -"text-after-edge" -"text-anchor" -"text-before-edge" -"text-decoration" -"textLength" -"textPath" -"text-rendering" -"title" -"to" -"transform" -"tref" -"tspan" -"type" -"u1" -"u2" -"ultra-condensed" -"ultra-expanded" -"underline" -"underline-position" -"underline-thickness" -"unicode" -"unicode-bidi" -"unicode-range" -"units-per-em" -"use" -"use-script" -"v-alphabetic" -"values" -"version" -"vert-adv-y" -"vert-origin-x" -"vert-origin-y" -"v-hanging" -"v-ideographic" -"view" -"viewBox" -"viewTarget" -"visibility" -"visible" -"visibleFill" -"visiblePainted" -"visibleStroke" -"vkern" -"v-mathematical" -"wait" -"wider" -"width" -"widths" -"word-spacing" -"w-resize" -"writing-mode" -"x" -"x1" -"x2" -"xChannelSelector" -"x-height" -"xlink:actuate" -"xlink:arcrole" -"xlink:href" -"xlink:role" -"xlink:show" -"xlink:title" -"xlink:type" -#XML -"xml:base" -"xml:lang" -"xml:space" -"y" -"y1" -"y2" -"yChannelSelector" -"z" -"zoomAndPan" diff --git a/testfiles/fuzzer.dict b/testfiles/fuzzer.dict new file mode 100644 index 000000000..7eee0d0a0 --- /dev/null +++ b/testfiles/fuzzer.dict @@ -0,0 +1,521 @@ +"100" +"200" +"300" +"400" +"500" +"600" +"700" +"800" +"900" +"a" +"accent-height" +"accumulate" +"additive" +"after-edge" +"alignment-baseline" +"all" +"alphabetic" +"altGlyph" +"altGlyphDef" +"altGlyphItem" +"amplitude" +"animate" +"animateColor" +"animateMotion" +"animateTransform" +"arabic-form" +"ascent" +attr_encoding=" encoding=\"1\"" +attr_generic=" a=\"1\"" +attr_href=" href=\"1\"" +"attributeName" +"attributeType" +attr_standalone=" standalone=\"no\"" +attr_version=" version=\"1\"" +attr_xml_base=" xml:base=\"1\"" +attr_xml_id=" xml:id=\"1\"" +attr_xml_lang=" xml:lang=\"1\"" +attr_xmlns=" xmlns=\"1\"" +attr_xml_space=" xml:space=\"1\"" +"auto" +"azimuth" +"baseFrequency" +"baseline" +"baseline-shift" +"baseProfile" +"bbox" +"before-edge" +"begin" +"bevel" +"bias" +"bidi-override" +"blink" +"block" +"bold" +"bolder" +"butt" +"by" +"calcMode" +"cap-height" +"caption" +"central" +"circle" +"class" +"clip" +"clip-path" +"clipPath" +"clipPathUnits" +"clip-rule" +"collapse" +"color" +"color-interpolation" +"color-interpolation-filters" +"color-profile" +"color-rendering" +"compact" +"condensed" +"contentScriptType" +"contentStyleType" +"crispEdges" +"crosshair" +"currentColor" +"cursor" +"cx" +"cy" +"d" +"default" +"defs" +"desc" +"descent" +"diffuseConstant" +"direction" +"display" +"divisor" +"dominant-baseline" +"dur" +"dx" +"dy" +"edgeMode" +"elevation" +"ellipse" +"embed" +"enable-background" +"end" +entity_builtin="<" +entity_decimal="" +entity_external="&a;" +entity_hex="" +"e-resize" +"evenodd" +"expanded" +"exponent" +"externalResourcesRequired" +"extra-condensed" +"extra-expanded" +"feBlend" +"feColorMatrix" +"feComponentTransfer" +"feComposite" +"feConvolveMatrix" +"feDiffuseLighting" +"feDisplacementMap" +"feDistantLight" +"feFlood" +"feFuncA" +"feFuncB" +"feFuncG" +"feFuncR" +"feGaussianBlur" +"feImage" +"feMerge" +"feMergeNode" +"feMorphology" +"feOffset" +"fePointLight" +"feSpecularLighting" +"feSpotLight" +"feTile" +"feTurbulence" +"fill" +"fill-opacity" +"fill-rule" +"filter" +"filterRes" +"filterUnits" +"flood-color" +"flood-opacity" +"font" +"font-face" +"font-face-format" +"font-face-name" +"font-face-src" +"font-face-uri" +"font-family" +"font-size" +"font-size-adjust" +"font-stretch" +"font-style" +"font-variant" +"font-weight" +"foreignObject" +"format" +"from" +"fx" +"fy" +"g" +"g1" +"g2" +"geometricPrecision" +"glyph" +"glyph-name" +"glyph-orientation-horizontal" +"glyph-orientation-vertical" +"glyphRef" +"gradientTransform" +"gradientUnits" +"hanging" +"height" +"help" +"hidden" +"hkern" +"horiz-adv-x" +"horiz-origin-x" +"horiz-origin-y" +"icon" +"id" +"ideographic" +"image" +"image-rendering" +"in" +"in2" +"individual" +"inherit" +"inline" +"inline-table" +"intercept" +"italic" +"k" +"k1" +"k2" +"k3" +"k4" +"kernelMatrix" +"kernelUnitLength" +"kerning" +"keyPoints" +"keySplines" +"keyTimes" +"lang" +"lengthAdjust" +"letter-spacing" +"lighter" +"lighting-color" +"limitingConeAngle" +"line" +"linearGradient" +"linearRGB" +"'line-height'" +"line-through" +"list-item" +"local" +"lr" +"lr-tb" +"ltr" +"marker" +"marker-end" +"markerHeight" +"marker-mid" +"marker-start" +"markerUnits" +"markerWidth" +"mask" +"maskContentUnits" +"maskUnits" +"mathematical" +"max" +"media" +"menu" +"message-box" +"metadata" +"method" +"middle" +"min" +"missing-glyph" +"miter" +"mode" +"move" +"mpath" +"name" +"narrower" +"ne-resize" +"new" +"no-change" +"none" +"nonzero" +"normal" +"n-resize" +"numOctaves" +"nw-resize" +"oblique" +"offset" +"onabort" +"onactivate" +"onbegin" +"onclick" +"onend" +"onerror" +"onfocusin" +"onfocusout" +"onload" +"onmousedown" +"onmousemove" +"onmouseout" +"onmouseover" +"onmouseup" +"onrepeat" +"onresize" +"onscroll" +"onunload" +"onzoom" +"opacity" +"operator" +"optimizeLegibility" +"optimizeQuality" +"optimizeSpeed" +"order" +"orient" +"orientation" +"origin" +"overflow" +"overline" +"overline-position" +"overline-thickness" +"paint" +"painted" +"panose-1" +"path" +"pathLength" +"pattern" +"patternContentUnits" +"patternTransform" +"patternUnits" +"pointer" +"pointer-events" +"points" +"pointsAtX" +"pointsAtY" +"pointsAtZ" +"polygon" +"polyline" +"preserveAlpha" +"preserveAspectRatio" +"primitiveUnits" +"properties" +"r" +"radialGradient" +"radius" +"rect" +"refX" +"refY" +"rendering-intent" +"repeatCount" +"repeatDur" +"requiredExtensions" +"requiredFeatures" +"reset-size" +"restart" +"result" +"rl" +"rl-tb" +"rotate" +"round" +"rtl" +"run-in" +"rx" +"ry" +"scale" +"script" +"scroll" +"see" +"seed" +"semi-condensed" +"semi-expanded" +"se-resize" +"set" +"shape-rendering" +"slope" +"small-caps" +"small-caption" +"spacing" +"Specifying" +"specularConstant" +"specularExponent" +"spreadMethod" +"square" +"s-resize" +"sRGB" +"start" +"startOffset" +"status-bar" +"stdDeviation" +"stemh" +"stemv" +"stitchTiles" +"stop" +"stop-color" +"stop-opacity" +"strikethrough-position" +"strikethrough-thickness" +"string" +string_any="ANY" +string_brackets="[]" +string_cdata="CDATA" +string_col_fallback=":fallback" +string_col_generic=":a" +string_col_include=":include" +string_dashes="--" +string_empty_dblquotes="\"\"" +string_empty="EMPTY" +string_empty_quotes="''" +string_entities="ENTITIES" +string_entity="ENTITY" +string_fixed="#FIXED" +string_id="ID" +string_idref="IDREF" +string_idrefs="IDREFS" +string_implied="#IMPLIED" +string_nmtoken="NMTOKEN" +string_nmtokens="NMTOKENS" +string_notation="NOTATION" +string_parentheses="()" +string_pcdata="#PCDATA" +string_percent="%a" +string_public="PUBLIC" +string_required="#REQUIRED" +string_schema=":schema" +string_system="SYSTEM" +string_ucs4="UCS-4" +string_utf16="UTF-16" +string_utf8="UTF-8" +string_xmlns="xmlns:" +"stroke" +"stroke-dasharray" +"stroke-dashoffset" +"stroke-linecap" +"stroke-linejoin" +"stroke-miterlimit" +"stroke-opacity" +"stroke-width" +"style" +"sub" +"super" +"surfaceScale" +"svg" +"switch" +"sw-resize" +"symbol" +"systemLanguage" +"table" +"table-caption" +"table-cell" +"table-column" +"table-column-group" +"table-footer-group" +"table-header-group" +"table-row" +"table-row-group" +"tableValues" +tag_attlist="" +tag_doctype="" +tag_open_close="" +tag_open_exclamation="" +tag_xml_q="" +"target" +"targetX" +"targetY" +"tb" +"tb-rl" +"text" +"text-after-edge" +"text-anchor" +"text-before-edge" +"text-decoration" +"textLength" +"textPath" +"text-rendering" +"title" +"to" +"transform" +"tref" +"tspan" +"type" +"u1" +"u2" +"ultra-condensed" +"ultra-expanded" +"underline" +"underline-position" +"underline-thickness" +"unicode" +"unicode-bidi" +"unicode-range" +"units-per-em" +"use" +"use-script" +"v-alphabetic" +"values" +"version" +"vert-adv-y" +"vert-origin-x" +"vert-origin-y" +"v-hanging" +"v-ideographic" +"view" +"viewBox" +"viewTarget" +"visibility" +"visible" +"visibleFill" +"visiblePainted" +"visibleStroke" +"vkern" +"v-mathematical" +"wait" +"wider" +"width" +"widths" +"word-spacing" +"w-resize" +"writing-mode" +"x" +"x1" +"x2" +"xChannelSelector" +"x-height" +"xlink:actuate" +"xlink:arcrole" +"xlink:href" +"xlink:role" +"xlink:show" +"xlink:title" +"xlink:type" +#XML +"xml:base" +"xml:lang" +"xml:space" +"y" +"y1" +"y2" +"yChannelSelector" +"z" +"zoomAndPan" -- cgit v1.2.3