<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sciteco/tests, branch v2.0.0</title>
<subtitle>Scintilla-based Text Editor and COrrector</subtitle>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/'/>
<entry>
<title>FreeBSD: fixed test suite</title>
<updated>2023-05-14T01:56:56+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2023-05-14T01:56:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=6333590e0822ccb5e707e4784bfd19ecbae60840'/>
<id>6333590e0822ccb5e707e4784bfd19ecbae60840</id>
<content type='text'>
* it appears to behave similar to Mac OS with regard to recursions
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* it appears to behave similar to Mac OS with regard to recursions
</pre>
</div>
</content>
</entry>
<entry>
<title>fixed pass-through loops: especially :&gt; and :F&lt;</title>
<updated>2022-12-10T04:56:44+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2022-12-10T04:56:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=247884ab43025408c9f717ce2f15b6b725f74159'/>
<id>247884ab43025408c9f717ce2f15b6b725f74159</id>
<content type='text'>
* fixes test cases like 3&lt;%a:&gt;
* you can now use :F&lt; in pass-through loops as well
* F&gt; outside of loops will now exit the current macro level.
  This is analogous to what TECO-11 did.
  In interactive mode, F&gt; is currently also equivalent to $$
  (terminates command line).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* fixes test cases like 3&lt;%a:&gt;
* you can now use :F&lt; in pass-through loops as well
* F&gt; outside of loops will now exit the current macro level.
  This is analogous to what TECO-11 did.
  In interactive mode, F&gt; is currently also equivalent to $$
  (terminates command line).
</pre>
</div>
</content>
</entry>
<entry>
<title>testsuite: added (known bug) testcases for dangling else- and end-if statements</title>
<updated>2022-12-01T04:43:04+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2022-12-01T04:32:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=db40b99e38149d644808ec22b44a89fe758b739b'/>
<id>db40b99e38149d644808ec22b44a89fe758b739b</id>
<content type='text'>
* This is not easy to fix (show errors when encountering these constructs without
  preceding if &lt;"&gt; statements) and would require complicating the parser only to
  detect this.
  On the other hand, keeping things as they are does not really harm anybody.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* This is not easy to fix (show errors when encountering these constructs without
  preceding if &lt;"&gt; statements) and would require complicating the parser only to
  detect this.
  On the other hand, keeping things as they are does not really harm anybody.
</pre>
</div>
</content>
</entry>
<entry>
<title>fixed a number of crashes due to empty string arguments or uninitialized registers</title>
<updated>2022-11-28T03:05:48+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2022-11-28T03:05:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=9a20db4b5257d56d2d6030a20ad42f5e0dc9f25b'/>
<id>9a20db4b5257d56d2d6030a20ad42f5e0dc9f25b</id>
<content type='text'>
* An empty but valid teco_string_t can contain NULL pointers.
  More precisely, a state's done_cb() can be invoked with such empty strings
  in case of empty string arguments.
  Also a registers get_string() can return the NULL pointer
  for existing registers with uninitialized string parts.
* In all of these cases, the language should treat "uninitialized" strings
  exactly like empty strings.
* Not doing so, resulted in a number of vulnerabilities.
  * EN$$ crashed if "_" was uninitialized
  * The ^E@q and ^ENq string building constructs would crash for existing but
    uninitialized registers q.
  * ?$ would crash
  * ESSETILEXER$$ would crash
* This is now fixed.
  Test cases have been added.
* I cannot guarantee that I have found all such cases.
  Generally, it might be wise to change our definitions and make sure that
  every teco_string_t must have an associated heap object to be valid.
  All functions returning pointer+length pairs should consequently also never
  return NULL pointers.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* An empty but valid teco_string_t can contain NULL pointers.
  More precisely, a state's done_cb() can be invoked with such empty strings
  in case of empty string arguments.
  Also a registers get_string() can return the NULL pointer
  for existing registers with uninitialized string parts.
* In all of these cases, the language should treat "uninitialized" strings
  exactly like empty strings.
* Not doing so, resulted in a number of vulnerabilities.
  * EN$$ crashed if "_" was uninitialized
  * The ^E@q and ^ENq string building constructs would crash for existing but
    uninitialized registers q.
  * ?$ would crash
  * ESSETILEXER$$ would crash
* This is now fixed.
  Test cases have been added.
* I cannot guarantee that I have found all such cases.
  Generally, it might be wise to change our definitions and make sure that
  every teco_string_t must have an associated heap object to be valid.
  All functions returning pointer+length pairs should consequently also never
  return NULL pointers.
</pre>
</div>
</content>
</entry>
<entry>
<title>test suite: temporarily disabled the "Pattern matching overflow" test case</title>
<updated>2022-11-20T16:54:13+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2022-11-20T16:54:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=ef04eaad307df4e6b0a6b4d713401df81ba5afc6'/>
<id>ef04eaad307df4e6b0a6b4d713401df81ba5afc6</id>
<content type='text'>
* This test case no longer fails on MacOS and MinGW builds probably
  because the settings of the underlying libpcre library changed.
* Since these settings are not predictable, cannot be queried and may even change on some
  flavors of Linux, it has been completely disabled for the time being.
* Should fix CI and nightly builds on MacOS and Win32
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* This test case no longer fails on MacOS and MinGW builds probably
  because the settings of the underlying libpcre library changed.
* Since these settings are not predictable, cannot be queried and may even change on some
  flavors of Linux, it has been completely disabled for the time being.
* Should fix CI and nightly builds on MacOS and Win32
</pre>
</div>
</content>
</entry>
<entry>
<title>safer use of memcpy() and memchr(): we must not pass in NULL pointers</title>
<updated>2021-12-19T01:38:04+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2021-12-19T01:38:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=3614e5877818a3f3e187b43f8247cabaf842c39f'/>
<id>3614e5877818a3f3e187b43f8247cabaf842c39f</id>
<content type='text'>
* The C standard actually forbids this (undefined behaviour) even though
  it seems intuitive that something like `memcpy(foo, NULL, 0)` does no harm.
* It turned out, there were actual real bugs related to this.
  If memchr() was called with a variable that can be NULL,
  the compiler could assume that the variable is actually always non-NULL
  (since glibc declares memchr() with nonnull), consequently eliminating
  checks for NULL afterwards.
  The same could theoretically happen with memcpy().
  This manifested itself in the empty search crashing when building with -O3.
  Test case:
  sciteco -e '@S//'
* Consequently, the nightly builds (at least for Ubuntu) also had this bug.
* In some cases, the passed in pointers are passed down from the caller but
  should not be NULL, so I added runtime assertions to guard against it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* The C standard actually forbids this (undefined behaviour) even though
  it seems intuitive that something like `memcpy(foo, NULL, 0)` does no harm.
* It turned out, there were actual real bugs related to this.
  If memchr() was called with a variable that can be NULL,
  the compiler could assume that the variable is actually always non-NULL
  (since glibc declares memchr() with nonnull), consequently eliminating
  checks for NULL afterwards.
  The same could theoretically happen with memcpy().
  This manifested itself in the empty search crashing when building with -O3.
  Test case:
  sciteco -e '@S//'
* Consequently, the nightly builds (at least for Ubuntu) also had this bug.
* In some cases, the passed in pointers are passed down from the caller but
  should not be NULL, so I added runtime assertions to guard against it.
</pre>
</div>
</content>
</entry>
<entry>
<title>fixed testsuite on Mac OS: skip the recursion overflow test case</title>
<updated>2021-10-23T23:09:50+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2021-10-23T23:09:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=4aa6cddca445b71a97fc200cf4437233bde91a46'/>
<id>4aa6cddca445b71a97fc200cf4437233bde91a46</id>
<content type='text'>
* Turns out we cannot assume that the test case never crashes on Mac OS,
  so we instead now skip the entire test case on Mac OS.
  It apparently crashes even on Mac OS when building with --enable-debug (-O0).
* Should fix Continous Integration for Mac OS.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Turns out we cannot assume that the test case never crashes on Mac OS,
  so we instead now skip the entire test case on Mac OS.
  It apparently crashes even on Mac OS when building with --enable-debug (-O0).
* Should fix Continous Integration for Mac OS.
</pre>
</div>
</content>
</entry>
<entry>
<title>fixed crashes when the Q-Reg stack is non-empty at exit</title>
<updated>2021-10-11T06:23:39+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2021-10-11T06:23:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=af16d43af82ad0d05710c42232332a400614d3ea'/>
<id>af16d43af82ad0d05710c42232332a400614d3ea</id>
<content type='text'>
* Test case: sciteco -e '[a'
  [aEX$$ in interactive mode would also crash.
* No longer use a destructor - it was executed after the Q-Reg view was
  destroyed.
* Instead, we now explicitly call teco_qreg_stack_clear() in main().
* Added a regression test case.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Test case: sciteco -e '[a'
  [aEX$$ in interactive mode would also crash.
* No longer use a destructor - it was executed after the Q-Reg view was
  destroyed.
* Instead, we now explicitly call teco_qreg_stack_clear() in main().
* Added a regression test case.
</pre>
</div>
</content>
</entry>
<entry>
<title>Testsuite: standardized the use of square brackets in test case code and test escaping of braces in Q-Register specifications</title>
<updated>2021-10-08T20:11:22+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2021-06-11T15:01:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=23f42ca6b833dc1a76108fd2f72bde90489ce015'/>
<id>23f42ca6b833dc1a76108fd2f72bde90489ce015</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed testsuite on Mac OS: `echo -n` is apparently not supported on whatever $SHELL they execute the testsuite in</title>
<updated>2021-10-08T20:11:22+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2021-06-10T02:22:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=fd2390e7f1f78da4decb34edfe1f2a783b817b15'/>
<id>fd2390e7f1f78da4decb34edfe1f2a783b817b15</id>
<content type='text'>
* instead, we now use `dd`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* instead, we now use `dd`.
</pre>
</div>
</content>
</entry>
</feed>
