aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--leakcheck.md1561
2 files changed, 1562 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 2a96722..e8a37d7 100644
--- a/Makefile
+++ b/Makefile
@@ -66,8 +66,7 @@ dingus: js/stmd.js
cd js && echo "Starting dingus server at http://localhost:9000" && python -m SimpleHTTPServer 9000
leakcheck: $(PROG)
- # TODO produce leaktest.md that tests everything
- cat leaktest.md | valgrind --leak-check=full --dsymutil=yes $(PROG)
+ cat leakcheck.md | valgrind --leak-check=full --dsymutil=yes $(PROG)
operf: $(PROG)
operf $(PROG) <bench.md >/dev/null
diff --git a/leakcheck.md b/leakcheck.md
new file mode 100644
index 0000000..06716e1
--- /dev/null
+++ b/leakcheck.md
@@ -0,0 +1,1561 @@
+→foo→baz→→bim
+
+ a→a
+ ὐ→a
+
+- `one
+- two`
+
+***
+---
+___
+
++++
+
+===
+
+--
+**
+__
+
+ ***
+ ***
+ ***
+
+ ***
+
+Foo
+ ***
+
+_____________________________________
+
+ - - -
+
+ ** * ** * ** * **
+
+- - - -
+
+- - - -
+
+_ _ _ _ a
+
+a------
+
+ *-*
+
+- foo
+***
+- bar
+
+Foo
+***
+bar
+
+Foo
+---
+bar
+
+* Foo
+* * *
+* Bar
+
+- Foo
+- * * *
+
+# foo
+## foo
+### foo
+#### foo
+##### foo
+###### foo
+
+####### foo
+
+#5 bolt
+
+\## foo
+
+# foo *bar* \*baz\*
+
+# foo
+
+ ### foo
+ ## foo
+ # foo
+
+ # foo
+
+foo
+ # bar
+
+## foo ##
+ ### bar ###
+
+# foo ##################################
+##### foo ##
+
+### foo ###
+
+### foo ### b
+
+### foo \###
+## foo \#\##
+# foo \#
+
+****
+## foo
+****
+
+Foo bar
+# baz
+Bar foo
+
+##
+#
+### ###
+
+Foo *bar*
+=========
+
+Foo *bar*
+---------
+
+Foo
+-------------------------
+
+Foo
+=
+
+ Foo
+---
+
+ Foo
+-----
+
+ Foo
+ ===
+
+ Foo
+ ---
+
+ Foo
+---
+
+Foo
+ ----
+
+Foo
+ ---
+
+Foo
+= =
+
+Foo
+--- -
+
+Foo
+-----
+
+Foo\
+----
+
+`Foo
+----
+`
+
+<a title="a lot
+---
+of dashes"/>
+
+> Foo
+---
+
+Foo
+Bar
+---
+
+Foo
+Bar
+===
+
+---
+Foo
+---
+Bar
+---
+Baz
+
+
+====
+
+ a simple
+ indented code block
+
+ <a/>
+ *hi*
+
+ - one
+
+ chunk1
+
+ chunk2
+
+
+
+ chunk3
+
+ chunk1
+
+ chunk2
+
+Foo
+ bar
+
+
+ foo
+bar
+
+# Header
+ foo
+Header
+------
+ foo
+----
+
+ foo
+ bar
+
+
+
+ foo
+
+
+
+ foo
+
+```
+<
+ >
+```
+
+~~~
+<
+ >
+~~~
+
+```
+aaa
+~~~
+```
+
+~~~
+aaa
+```
+~~~
+
+````
+aaa
+```
+``````
+
+~~~~
+aaa
+~~~
+~~~~
+
+```
+
+`````
+
+```
+aaa
+
+```
+
+
+```
+
+```
+```
+
+ ```
+ aaa
+aaa
+```
+
+ ```
+aaa
+ aaa
+aaa
+ ```
+
+ ```
+ aaa
+ aaa
+ aaa
+ ```
+
+ ```
+ aaa
+ ```
+
+``` ```
+aaa
+
+~~~~~~
+aaa
+~~~ ~~
+
+foo
+```
+bar
+```
+baz
+
+foo
+---
+~~~
+bar
+~~~
+# baz
+
+```ruby
+def foo(x)
+ return 3
+end
+```
+
+~~~~ ruby startline=3 $%@#$
+def foo(x)
+ return 3
+end
+~~~~~~~
+
+````;
+````
+
+``` aa ```
+foo
+
+```
+``` aaa
+```
+
+<table>
+ <tr>
+ <td>
+ hi
+ </td>
+ </tr>
+</table>
+
+okay.
+
+ <div>
+ *hello*
+ <foo><a>
+
+<DIV CLASS="foo">
+
+*Markdown*
+
+</DIV>
+
+<div></div>
+``` c
+int x = 33;
+```
+
+<!-- Foo
+bar
+ baz -->
+
+<?php
+ echo 'foo'
+?>
+
+<![CDATA[
+function matchwo(a,b)
+{
+if (a < b && a < 0) then
+ {
+ return 1;
+ }
+else
+ {
+ return 0;
+ }
+}
+]]>
+
+ <!-- foo -->
+
+ <!-- foo -->
+
+Foo
+<div>
+bar
+</div>
+
+<div>
+bar
+</div>
+*foo*
+
+<div class
+foo
+
+<div>
+
+*Emphasized* text.
+
+</div>
+
+<div>
+*Emphasized* text.
+</div>
+
+<table>
+
+<tr>
+
+<td>
+Hi
+</td>
+
+</tr>
+
+</table>
+
+[foo]: /url "title"
+
+[foo]
+
+ [foo]:
+ /url
+ 'the title'
+
+[foo]
+
+[Foo*bar\]]:my_(url) 'title (with parens)'
+
+[Foo*bar\]]
+
+[Foo bar]:
+<my url>
+'title'
+
+[Foo bar]
+
+[foo]:
+/url
+
+[foo]
+
+[foo]:
+
+[foo]
+
+[foo]
+
+[foo]: url
+
+[foo]
+
+[foo]: first
+[foo]: second
+
+[FOO]: /url
+
+[Foo]
+
+[ΑΓΩ]: /φου
+
+[αγω]
+
+[foo]: /url
+
+[foo]: /url "title" ok
+
+ [foo]: /url "title"
+
+[foo]
+
+```
+[foo]: /url
+```
+
+[foo]
+
+Foo
+[bar]: /baz
+
+[bar]
+
+# [Foo]
+[foo]: /url
+> bar
+
+[foo]: /foo-url "foo"
+[bar]: /bar-url
+ "bar"
+[baz]: /baz-url
+
+[foo],
+[bar],
+[baz]
+
+[foo]
+
+> [foo]: /url
+
+aaa
+
+bbb
+
+aaa
+bbb
+
+ccc
+ddd
+
+aaa
+
+
+bbb
+
+ aaa
+ bbb
+
+aaa
+ bbb
+ ccc
+
+ aaa
+bbb
+
+ aaa
+bbb
+
+aaa
+bbb
+
+
+
+aaa
+
+
+# aaa
+
+
+
+> # Foo
+> bar
+> baz
+
+># Foo
+>bar
+> baz
+
+ > # Foo
+ > bar
+ > baz
+
+ > # Foo
+ > bar
+ > baz
+
+> # Foo
+> bar
+baz
+
+> bar
+baz
+> foo
+
+> foo
+---
+
+> - foo
+- bar
+
+> foo
+ bar
+
+> ```
+foo
+```
+
+>
+
+>
+>
+>
+
+>
+> foo
+>
+
+> foo
+
+> bar
+
+> foo
+> bar
+
+> foo
+>
+> bar
+
+foo
+> bar
+
+> aaa
+***
+> bbb
+
+> bar
+baz
+
+> bar
+
+baz
+
+> bar
+>
+baz
+
+> > > foo
+bar
+
+>>> foo
+> bar
+>>baz
+
+> code
+
+> not code
+
+A paragraph
+with two lines.
+
+ indented code
+
+> A block quote.
+
+1. A paragraph
+ with two lines.
+
+ indented code
+
+ > A block quote.
+
+- one
+
+ two
+
+- one
+
+ two
+
+ - one
+
+ two
+
+ - one
+
+ two
+
+ > > 1. one
+>>
+>> two
+
+>>- one
+>>
+ > > two
+
+- foo
+
+ bar
+
+- foo
+
+
+ bar
+
+- ```
+ foo
+
+
+ bar
+ ```
+
+1. foo
+
+ ```
+ bar
+ ```
+
+ baz
+
+ > bam
+
+- foo
+
+ bar
+
+ 10. foo
+
+ bar
+
+ indented code
+
+paragraph
+
+ more code
+
+1. indented code
+
+ paragraph
+
+ more code
+
+1. indented code
+
+ paragraph
+
+ more code
+
+ foo
+
+bar
+
+- foo
+
+ bar
+
+- foo
+
+ bar
+
+ 1. A paragraph
+ with two lines.
+
+ indented code
+
+ > A block quote.
+
+ 1. A paragraph
+ with two lines.
+
+ indented code
+
+ > A block quote.
+
+ 1. A paragraph
+ with two lines.
+
+ indented code
+
+ > A block quote.
+
+ 1. A paragraph
+ with two lines.
+
+ indented code
+
+ > A block quote.
+
+ 1. A paragraph
+with two lines.
+
+ indented code
+
+ > A block quote.
+
+ 1. A paragraph
+ with two lines.
+
+> 1. > Blockquote
+continued here.
+
+> 1. > Blockquote
+> continued here.
+
+- foo
+ - bar
+ - baz
+
+- foo
+ - bar
+ - baz
+
+10) foo
+ - bar
+
+10) foo
+ - bar
+
+- - foo
+
+1. - 2. foo
+
+- foo
+-
+- bar
+
+-
+
+- foo
+- bar
++ baz
+
+1. foo
+2. bar
+3) baz
+
+- foo
+
+- bar
+
+
+- baz
+
+- foo
+
+
+ bar
+- baz
+
+- foo
+ - bar
+ - baz
+
+
+ bim
+
+- foo
+- bar
+
+
+- baz
+- bim
+
+- foo
+
+ notcode
+
+- foo
+
+
+ code
+
+- a
+ - b
+ - c
+ - d
+ - e
+ - f
+- g
+
+- a
+- b
+
+- c
+
+* a
+*
+
+* c
+
+- a
+- b
+
+ c
+- d
+
+- a
+- b
+
+ [ref]: /url
+- d
+
+- a
+- ```
+ b
+
+
+ ```
+- c
+
+- a
+ - b
+
+ c
+- d
+
+* a
+ > b
+ >
+* c
+
+- a
+ > b
+ ```
+ c
+ ```
+- d
+
+- a
+
+- a
+ - b
+
+* foo
+ * bar
+
+ baz
+
+- a
+ - b
+ - c
+
+- d
+ - e
+ - f
+
+`hi`lo`
+
+\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\[\\\]\^\_\`\{\|\}\~
+
+\→\A\a\ \3\φ\«
+
+\*not emphasized*
+\<br/> not a tag
+\[not a link](/foo)
+\`not code`
+1\. not a list
+\* not a list
+\# not a header
+\[foo]: /url "not a reference"
+
+\\*emphasis*
+
+foo\
+bar
+
+`` \[\` ``
+
+ \[\]
+
+~~~
+\[\]
+~~~
+
+<http://example.com?find=\*>
+
+<a href="/bar\/)">
+
+[foo](/bar\* "ti\*tle")
+
+[foo]
+
+[foo]: /bar\* "ti\*tle"
+
+``` foo\+bar
+foo
+```
+
+&nbsp; &amp; &copy; &AElig; &Dcaron; &frac34; &HilbertSpace; &DifferentialD; &ClockwiseContourIntegral;
+
+&#35; &#1234; &#992; &#98765432;
+
+&#X22; &#XD06; &#xcab;
+
+&nbsp &x; &#; &#x; &ThisIsWayTooLongToBeAnEntityIsntIt; &hi?;
+
+&copy
+
+&MadeUpEntity;
+
+<a href="&ouml;&ouml;.html">
+
+[foo](/f&ouml;&ouml; "f&ouml;&ouml;")
+
+[foo]
+
+[foo]: /f&ouml;&ouml; "f&ouml;&ouml;"
+
+``` f&ouml;&ouml;
+foo
+```
+
+`f&ouml;&ouml;`
+
+ f&ouml;f&ouml;
+
+`foo`
+
+`` foo ` bar ``
+
+` `` `
+
+``
+foo
+``
+
+`foo bar
+ baz`
+
+`foo `` bar`
+
+`foo\`bar`
+
+*foo`*`
+
+[not a `link](/foo`)
+
+<http://foo.bar.`baz>`
+
+<a href="`">`
+
+```foo``
+
+`foo
+
+*foo bar*
+
+_foo bar_
+
+**foo bar**
+
+__foo bar__
+
+*foo
+bar*
+
+_foo
+bar_
+
+**foo
+bar**
+
+__foo
+bar__
+
+*foo [bar](/url)*
+
+_foo [bar](/url)_
+
+**foo [bar](/url)**
+
+__foo [bar](/url)__
+
+*foo [bar*](/url)
+
+_foo [bar_](/url)
+
+**<a href="**">
+
+__<a href="__">
+
+*a `*`*
+
+_a `_`_
+
+**a<http://foo.bar?q=**>
+
+__a<http://foo.bar?q=__>
+
+and * foo bar*
+
+_ foo bar_
+
+and ** foo bar**
+
+__ foo bar__
+
+and *foo bar *
+
+and _foo bar _
+
+and **foo bar **
+
+and __foo bar __
+
+****hi****
+
+_____hi_____
+
+Sign here: _________
+
+** is not an empty emphasis
+
+**** is not an empty strong emphasis
+
+*here is a \**
+
+__this is a double underscore (`__`)__
+
+*_*
+
+_*_
+
+*__*
+
+_**_
+
+foo*bar*baz
+
+foo_bar_baz
+
+foo__bar__baz
+
+_foo_bar_baz_
+
+11*15*32
+
+11_15_32
+
+_foo_bar_baz_
+
+__foo__bar__baz__
+
+***foo bar***
+
+___foo bar___
+
+***foo** bar*
+
+___foo__ bar_
+
+***foo* bar**
+
+___foo_ bar__
+
+*foo **bar***
+
+_foo __bar___
+
+**foo *bar***
+
+__foo _bar___
+
+*foo **bar***
+
+_foo __bar___
+
+*foo *bar* baz*
+
+_foo _bar_ baz_
+
+**foo **bar** baz**
+
+__foo __bar__ baz__
+
+*foo **bar** baz*
+
+_foo __bar__ baz_
+
+**foo *bar* baz**
+
+__foo _bar_ baz__
+
+**foo, *bar*, baz**
+
+__foo, _bar_, baz__
+
+*foo**bar**baz*
+
+**foo*bar*baz**
+
+**foo**
+
+****foo****
+
+*_foo_*
+
+**__foo__**
+
+*foo**
+
+*foo *bar**
+
+**foo***
+
+***foo* bar***
+
+***foo** bar***
+
+*foo**bar***
+
+*foo****
+
+*foo**
+
+**foo*
+
+*foo *bar**
+
+**foo* bar*
+
+*bar***
+
+***foo*
+
+**bar***
+
+***foo**
+
+***foo *bar*
+
+[link](/uri "title")
+
+[link](/uri)
+
+[link]()
+
+[link](<>)
+
+[link](/my uri)
+
+[link](</my uri>)
+
+[link](foo
+bar)
+
+[link]((foo)and(bar))
+
+[link](foo(and(bar)))
+
+[link](foo(and\(bar\)))
+
+[link](<foo(and(bar))>)
+
+[link](foo\)\:)
+
+[link](foo%20b&auml;)
+
+[link]("title")
+
+[link](/url "title")
+[link](/url 'title')
+[link](/url (title))
+
+[link](/url "title \"&quot;")
+
+[link](/url "title "and" title")
+
+[link](/url 'title "and" title')
+
+[link]( /uri
+ "title" )
+
+[link] (/uri)
+
+[foo <bar attr="](baz)">
+
+[foo][bar]
+
+[bar]: /url "title"
+
+[*foo\!*][bar]
+
+[bar]: /url "title"
+
+[foo][BaR]
+
+[bar]: /url "title"
+
+[Толпой][Толпой] is a Russian word.
+
+[ТОЛПОЙ]: /url
+
+[Foo
+ bar]: /url
+
+[Baz][Foo bar]
+
+[foo] [bar]
+
+[bar]: /url "title"
+
+[foo]
+[bar]
+
+[bar]: /url "title"
+
+[foo]: /url1
+
+[foo]: /url2
+
+[bar][foo]
+
+[bar][foo\!]
+
+[foo!]: /url
+
+[foo][]
+
+[foo]: /url "title"
+
+[*foo* bar][]
+
+[*foo* bar]: /url "title"
+
+[Foo][]
+
+[foo]: /url "title"
+
+[foo]
+[]
+
+[foo]: /url "title"
+
+[foo]
+
+[foo]: /url "title"
+
+[*foo* bar]
+
+[*foo* bar]: /url "title"
+
+[[*foo* bar]]
+
+[*foo* bar]: /url "title"
+
+[Foo]
+
+[foo]: /url "title"
+
+\[foo]
+
+[foo]: /url "title"
+
+[foo*]: /url
+
+*[foo*]
+
+[foo`]: /url
+
+[foo`]`
+
+[[[foo]]]
+
+[[[foo]]]: /url
+
+[[[foo]]]
+
+[[[foo]]]: /url1
+[foo]: /url2
+
+[\[foo]
+
+[\[foo]: /url
+
+[foo][bar]
+
+[foo]: /url1
+[bar]: /url2
+
+[foo][bar][baz]
+
+[baz]: /url
+
+[foo][bar][baz]
+
+[baz]: /url1
+[bar]: /url2
+
+[foo][bar][baz]
+
+[baz]: /url1
+[foo]: /url2
+
+![foo](/url "title")
+
+![foo *bar*]
+
+[foo *bar*]: train.jpg "train & tracks"
+
+![foo *bar*][]
+
+[foo *bar*]: train.jpg "train & tracks"
+
+![foo *bar*][foobar]
+
+[FOOBAR]: train.jpg "train & tracks"
+
+![foo](train.jpg)
+
+My ![foo bar](/path/to/train.jpg "title" )
+
+![foo](<url>)
+
+![](/url)
+
+![foo] [bar]
+
+[bar]: /url
+
+![foo] [bar]
+
+[BAR]: /url
+
+![foo][]
+
+[foo]: /url "title"
+
+![*foo* bar][]
+
+[*foo* bar]: /url "title"
+
+![Foo][]
+
+[foo]: /url "title"
+
+![foo]
+[]
+
+[foo]: /url "title"
+
+![foo]
+
+[foo]: /url "title"
+
+![*foo* bar]
+
+[*foo* bar]: /url "title"
+
+![[foo]]
+
+[[foo]]: /url "title"
+
+![Foo]
+
+[foo]: /url "title"
+
+\!\[foo]
+
+[foo]: /url "title"
+
+\![foo]
+
+[foo]: /url "title"
+
+<http://foo.bar.baz>
+
+<http://foo.bar.baz?q=hello&id=22&boolean>
+
+<irc://foo.bar:2233/baz>
+
+<MAILTO:FOO@BAR.BAZ>
+
+<http://foo.bar/baz bim>
+
+<foo@bar.example.com>
+
+<foo+special@Bar.baz-bar0.com>
+
+<>
+
+<heck://bing.bong>
+
+< http://foo.bar >
+
+<foo.bar.baz>
+
+<localhost:5001/foo>
+
+http://example.com
+
+foo@bar.example.com
+
+<a><bab><c2c>
+
+<a/><b2/>
+
+<a /><b2
+data="foo" >
+
+<a foo="bar" bam = 'baz <em>"</em>'
+_boolean zoop:33=zoop:33 />
+
+<33> <__>
+
+<a h*#ref="hi">
+
+<a href="hi'> <a href=hi'>
+
+< a><
+foo><bar/ >
+
+<a href='bar'title=title>
+
+</a>
+</foo >
+
+</a href="foo">
+
+foo <!-- this is a
+comment - with hyphen -->
+
+foo <!-- not a comment -- two hyphens -->
+
+foo <?php echo $a; ?>
+
+foo <!ELEMENT br EMPTY>
+
+foo <![CDATA[>&<]]>
+
+<a href="&ouml;">
+
+<a href="\*">
+
+<a href="\"">
+
+foo
+baz
+
+foo\
+baz
+
+foo
+baz
+
+foo
+ bar
+
+foo\
+ bar
+
+*foo
+bar*
+
+*foo\
+bar*
+
+`code
+span`
+
+`code\
+span`
+
+<a href="foo
+bar">
+
+<a href="foo\
+bar">
+
+foo
+baz
+
+foo
+ baz
+
+hello $.;'there
+
+Foo χρῆν
+
+Multiple spaces
+