I've made a sample dUnit project (for Delphi 2007) to reproduce the error
https://github.com/ashumkin/overbyteics-memory-corruption-demo

1. Clone project
2. Set correspondin SMTP_HOST, SMTP_FROM, SMTP_RECEPIENT env variables.
3. Run test
4. transmission logs are printed to status.
5. Test will fail. "Invalid pointer operation" will be occured while
TearDown.

Here's failure output
---8<---
DUnit / Testing
...TestMemoryCorruptionWhenReconnectAfterAbort: < 220 mail..... Ready
TestMemoryCorruptionWhenReconnectAfterAbort: Request done: smtpConnect:
220: 220 mail..... Ready
TestMemoryCorruptionWhenReconnectAfterAbort: HELO ashu-win7
TestMemoryCorruptionWhenReconnectAfterAbort: > HELO ashu-win7
TestMemoryCorruptionWhenReconnectAfterAbort: < 250 mail.... Ok
TestMemoryCorruptionWhenReconnectAfterAbort: Request done: smtpHelo: 250:
250 mail..... Ok
TestMemoryCorruptionWhenReconnectAfterAbort: ! HighLevelAsync 0
TestMemoryCorruptionWhenReconnectAfterAbort: MAIL FROM:<t...@tester.ru>
TestMemoryCorruptionWhenReconnectAfterAbort: > MAIL FROM:<t...@tester.ru>
TestMemoryCorruptionWhenReconnectAfterAbort: < 250 Ok
TestMemoryCorruptionWhenReconnectAfterAbort: ! HighLevelAsync 0
TestMemoryCorruptionWhenReconnectAfterAbort: RCPT TO:<....>
TestMemoryCorruptionWhenReconnectAfterAbort: > RCPT TO:<.....>
TestMemoryCorruptionWhenReconnectAfterAbort: < 250 Ok
TestMemoryCorruptionWhenReconnectAfterAbort: ! HighLevelAsync 0
TestMemoryCorruptionWhenReconnectAfterAbort: DATA
TestMemoryCorruptionWhenReconnectAfterAbort: Aborting!
TestMemoryCorruptionWhenReconnectAfterAbort: ! HighLevelAsync 0
TestMemoryCorruptionWhenReconnectAfterAbort: ! Abort detected
TestMemoryCorruptionWhenReconnectAfterAbort: ! HighLevelAsync done
TestMemoryCorruptionWhenReconnectAfterAbort: > DATA
TestMemoryCorruptionWhenReconnectAfterAbort: Request done: smtpMail: 250:
250 Ok
TestMemoryCorruptionWhenReconnectAfterAbort: Request done: smtpQuit: 250:
250 Ok
TestMemoryCorruptionWhenReconnectAfterAbort: < ..... Ready
FE
Time: 0:00:06.21

FAILURES!!!
Test Results:
Run:             1
Failures:        1
Errors:          1
There was 1 error:
  1) TestMemoryCorruptionWhenReconnectAfterAbort: EInvalidPointer
     at
      "TearDown FAILED: Invalid pointer operation"

There was 1 failure:
  1) TestMemoryCorruptionWhenReconnectAfterAbort: ETestFailure
     at
      "Mail must be sent, expected: <True> but was: <False>"
---8<---


And here is the output of successful test when the fix applied:
---8<---
DUnit / Testing
...TestMemoryCorruptionWhenReconnectAfterAbort: < 220 mail..... Ready
TestMemoryCorruptionWhenReconnectAfterAbort: Request done: smtpConnect:
220: 220 mail.... Ready
TestMemoryCorruptionWhenReconnectAfterAbort: HELO ashu-win7
TestMemoryCorruptionWhenReconnectAfterAbort: > HELO ashu-win7
TestMemoryCorruptionWhenReconnectAfterAbort: < 250 mail.rarus.ru Ok
TestMemoryCorruptionWhenReconnectAfterAbort: Request done: smtpHelo: 250:
250 mail.... Ok
TestMemoryCorruptionWhenReconnectAfterAbort: ! HighLevelAsync 0
TestMemoryCorruptionWhenReconnectAfterAbort: MAIL FROM:<t...@tester.ru>
TestMemoryCorruptionWhenReconnectAfterAbort: > MAIL FROM:<t...@tester.ru>
TestMemoryCorruptionWhenReconnectAfterAbort: < 250 Ok
TestMemoryCorruptionWhenReconnectAfterAbort: ! HighLevelAsync 0
TestMemoryCorruptionWhenReconnectAfterAbort: RCPT TO:<...>
TestMemoryCorruptionWhenReconnectAfterAbort: > RCPT TO:<...>
TestMemoryCorruptionWhenReconnectAfterAbort: < 250 Ok
TestMemoryCorruptionWhenReconnectAfterAbort: ! HighLevelAsync 0
TestMemoryCorruptionWhenReconnectAfterAbort: DATA
TestMemoryCorruptionWhenReconnectAfterAbort: Aborting!
TestMemoryCorruptionWhenReconnectAfterAbort: ! HighLevelAsync 0
TestMemoryCorruptionWhenReconnectAfterAbort: ! Abort detected
TestMemoryCorruptionWhenReconnectAfterAbort: ! HighLevelAsync done
TestMemoryCorruptionWhenReconnectAfterAbort: > DATA
TestMemoryCorruptionWhenReconnectAfterAbort: Request done: smtpMail: 250:
250 Ok
TestMemoryCorruptionWhenReconnectAfterAbort: Request done: smtpQuit: 250:
250 Ok
TestMemoryCorruptionWhenReconnectAfterAbort: < 220 mail.... Ready
TestMemoryCorruptionWhenReconnectAfterAbort: Request done: smtpConnect:
220: 220 mail... Ready
TestMemoryCorruptionWhenReconnectAfterAbort: HELO ashu-win7
TestMemoryCorruptionWhenReconnectAfterAbort: > HELO ashu-win7
TestMemoryCorruptionWhenReconnectAfterAbort: < 250 mail.rarus.ru Ok
TestMemoryCorruptionWhenReconnectAfterAbort: Request done: smtpHelo: 250:
250 mail.... Ok
TestMemoryCorruptionWhenReconnectAfterAbort: ! HighLevelAsync 0
TestMemoryCorruptionWhenReconnectAfterAbort: MAIL FROM:<t...@tester.ru>
TestMemoryCorruptionWhenReconnectAfterAbort: > MAIL FROM:<t...@tester.ru>
TestMemoryCorruptionWhenReconnectAfterAbort: < 250 Ok
TestMemoryCorruptionWhenReconnectAfterAbort: ! HighLevelAsync 0
TestMemoryCorruptionWhenReconnectAfterAbort: RCPT TO:<...>
TestMemoryCorruptionWhenReconnectAfterAbort: > RCPT TO:<...>
TestMemoryCorruptionWhenReconnectAfterAbort: < 250 Ok
TestMemoryCorruptionWhenReconnectAfterAbort: ! HighLevelAsync 0
TestMemoryCorruptionWhenReconnectAfterAbort: DATA
TestMemoryCorruptionWhenReconnectAfterAbort: > DATA
TestMemoryCorruptionWhenReconnectAfterAbort: < 354 Enter mail, end with "."
on a line by itself
TestMemoryCorruptionWhenReconnectAfterAbort: > Subject:
TestMemoryCorruptionWhenReconnectAfterAbort: > Mime-Version: 1.0
TestMemoryCorruptionWhenReconnectAfterAbort: > Content-Type: text/plain;
charset="windows-1251"
TestMemoryCorruptionWhenReconnectAfterAbort: > Date: Fri, 23 Feb 2018
01:50:51 +0300
TestMemoryCorruptionWhenReconnectAfterAbort: > Message-ID:
<20180222225051340.57E5D6CB835682B7@ashu-win7>
TestMemoryCorruptionWhenReconnectAfterAbort: > X-Mailer: ICS SMTP Component
V8.50
TestMemoryCorruptionWhenReconnectAfterAbort: >
TestMemoryCorruptionWhenReconnectAfterAbort: .
TestMemoryCorruptionWhenReconnectAfterAbort: > .
TestMemoryCorruptionWhenReconnectAfterAbort: < 250 Ok
TestMemoryCorruptionWhenReconnectAfterAbort: ! HighLevelAsync 0
TestMemoryCorruptionWhenReconnectAfterAbort: ! HighLevelAsync done
TestMemoryCorruptionWhenReconnectAfterAbort: Request done: smtpMail: 250:
250 Ok

Time: 0:00:00.61

OK: 1 tests
---8<---

2018-02-21 15:26 GMT+03:00 Angus Robertson - Magenta Systems Ltd <
an...@magsys.co.uk>:

> > After some investigation I've found the breakage commit
> > So, I propose this fix.
>
> I use the latest SMPT and POP3 components every few minutes and am not
> aware of any current issues with their proper use.
>
> But I've printed your email, and if I can reproduce your problem I will
> look at your fix, sorry it may be some weeks, very busy.
>
> Angus
>
>
> --
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
>
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to