Marco Ciot wrote:The affected module is DevCPT.
The bug is very old. I guess it was there in the original Oberon Compiler written by N. Wirth, already. (And never discovered so far?!?) If this particular language construct is used, however, it leads to Heap Corruption.
issue-#13: DevCPT bug
-
- Posts: 1700
- Joined: Tue Sep 17, 2013 12:21 am
- Location: Russia
issue-#13: DevCPT bug
- Attachments
-
- Test.zip
- (5.22 KiB) Downloaded 225 times
-
- Posts: 1700
- Joined: Tue Sep 17, 2013 12:21 am
- Location: Russia
Re: DevCPT bug
Marco suggested the solution: http://community.blackboxframework.org/ ... &t=64#p382
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: DevCPT bug
The proposed fix looks reasonable to me. Excellent work.
The bug can be seen easily by using the menu item Info->Interface... with
the option Interface Hints. The first hidden pointer is missing in type C.
As a consequence the runtime system crashes.
The names OutRecurseBaseTypeForHdFlds and FPrintRecurseBaseTypeForHdFlds
are instructive for reviewing purposes.
@Helmut:
For the final fix I would strongly suggest to adopt a more standard naming schema such as
OutHdBaseFlds
and
FPrintHdBaseFlds
- Josef
The bug can be seen easily by using the menu item Info->Interface... with
the option Interface Hints. The first hidden pointer is missing in type C.
As a consequence the runtime system crashes.
The names OutRecurseBaseTypeForHdFlds and FPrintRecurseBaseTypeForHdFlds
are instructive for reviewing purposes.
@Helmut:
For the final fix I would strongly suggest to adopt a more standard naming schema such as
OutHdBaseFlds
and
FPrintHdBaseFlds
- Josef
-
- Posts: 1700
- Joined: Tue Sep 17, 2013 12:21 am
- Location: Russia
Re: DevCPT bug
I made pull request with that bug fix:
https://github.com/BlackBoxCenter/bbcb/pull/1
What are the mechanism now? How to start voting?
https://github.com/BlackBoxCenter/bbcb/pull/1
What are the mechanism now? How to start voting?
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: DevCPT bug
The names of the new procedures are inappropriate.
Please do not merge the pull request in this form.
Use OutHdBaseFlds and FPrintHdBaseFlds.
It is hard to imagine that any other name would be more 'natural'
and the currently used names are certainly not fitting with the existing names.
Also there is no need to color the changes in the code
because in a system like Git/redmine you can recover the changed lines anyway.
What color would you use for the next change?
And what for the next and so on?
There is no reasonable convention available about using color coding for such changes.
And there is no need because we have Git now.
What we need is an entry in the redmine issue tracker that can be referred to in the Git commit.
What does that mean?
The goal is to have two-way traceability for changes and issues.
1. From a given issue, maintained in an issue tracker, you would like to
get the associated changes in the sources.
2. From the changes in the sources you would like to get to the
corresponding issue that caused the changes.
The usual way for getting this is to use an ID (a sequential number or any other code)
provided by the issue tracker and insert this code in the commit message.
A commonly used format for commit messages then looks like the following:
#ID: text describing the change
Now with all the pending changes in CPC 1.7rc1 the question is
where to start the issue tracking from?
- Josef
Please do not merge the pull request in this form.
Use OutHdBaseFlds and FPrintHdBaseFlds.
It is hard to imagine that any other name would be more 'natural'
and the currently used names are certainly not fitting with the existing names.
Also there is no need to color the changes in the code
because in a system like Git/redmine you can recover the changed lines anyway.
What color would you use for the next change?
And what for the next and so on?
There is no reasonable convention available about using color coding for such changes.
And there is no need because we have Git now.
What we need is an entry in the redmine issue tracker that can be referred to in the Git commit.
What does that mean?
The goal is to have two-way traceability for changes and issues.
1. From a given issue, maintained in an issue tracker, you would like to
get the associated changes in the sources.
2. From the changes in the sources you would like to get to the
corresponding issue that caused the changes.
The usual way for getting this is to use an ID (a sequential number or any other code)
provided by the issue tracker and insert this code in the commit message.
A commonly used format for commit messages then looks like the following:
#ID: text describing the change
Now with all the pending changes in CPC 1.7rc1 the question is
where to start the issue tracking from?
- Josef
-
- Posts: 1700
- Joined: Tue Sep 17, 2013 12:21 am
- Location: Russia
Re: #1 DevCPT bug
I agree, the color is superfluous, procedures names should be changed.
I closed pull request. I will make new one.
Look please here, I form the issue: http://redmine.blackboxframework.org/issues/1
Is that ok, what would you change there?
Josef, will you register in Redmine and add the comment about "OutHdBaseFlds and FPrintHdBaseFlds" or I should do this citing you?
I closed pull request. I will make new one.
Look please here, I form the issue: http://redmine.blackboxframework.org/issues/1
Is that ok, what would you change there?
Josef, will you register in Redmine and add the comment about "OutHdBaseFlds and FPrintHdBaseFlds" or I should do this citing you?
-
- Posts: 1700
- Joined: Tue Sep 17, 2013 12:21 am
- Location: Russia
Re: #1 DevCPT bug
Let's vote for including this bug fix in the development version?
http://redmine.blackboxframework.org/issues/1
http://redmine.blackboxframework.org/issues/1
-
- Posts: 1700
- Joined: Tue Sep 17, 2013 12:21 am
- Location: Russia
Re: #1 DevCPT bug
We need three people for initiating the voting process.
Who wants to include this bug fix in BlackBox?
Who wants to include this bug fix in BlackBox?
- DGDanforth
- Posts: 1061
- Joined: Tue Sep 17, 2013 1:16 am
- Location: Palo Alto, California, USA
- Contact:
Re: #1 DevCPT bug
I agree.Ivan Denisov wrote:We need three people for initiating the voting process.
Who wants to include this bug fix in BlackBox?
-Doug
-
- Posts: 1700
- Joined: Tue Sep 17, 2013 12:21 am
- Location: Russia
Re: #1 DevCPT bug
We need one more person for initiating the voting for including this fix into BlackBox-1.7 alpha1DGDanforth wrote:I agree.Ivan Denisov wrote:We need three people for initiating the voting process.
Who wants to include this bug fix in BlackBox?