Hello,
I want to ask, is anything wrong with this patch?
http://www.winehq.org/pipermail/wine-patches/2007-July/041434.html
I'm asking because I have other patches, but don't know if it is worthwhile to send them.
Regards Jiri Palecek
Hi Jiri,
I want to ask, is anything wrong with this patch?
Your indenting is haphazard. Please match the indenting in the rest of the file, which in this case is no tabs, 2-space indenting. Also, curly braces go on a new line, so e.g.: + if (!size) { should be + if (!size) + { instead.
--Juan
On Tue, 31 Jul 2007 17:38:18 +0200, Juan Lang juan.lang@gmail.com wrote:
Hi Jiri,
I want to ask, is anything wrong with this patch?
Your indenting is haphazard. Please match the indenting in the rest of the file, which in this case is no tabs, 2-space indenting. Also, curly braces go on a new line, so e.g.:
- if (!size) {
should be
- if (!size)
- {
instead.
Thank you. Hope it will be better this time. Also, I'll send a test if this is OK.
Changelog Implement the VarWeekdayName function in oleaut32.dll (fixes 5884)
Regards Jiri Palecek
Thank you. Hope it will be better this time. Also, I'll send a test if this is OK.
This one looks pretty good to me, but I have one error and a few nits to correct:
The error: + { + ERR("GetLocaleInfo of 0x%x failed in 2nd stage?!\n", localeValue); + SysFreeString(*pbstrOut);
You should set *pbstrOut to NULL in this case.
The nits: You have a couple small errors in the comments: - You misspell iWeekday - The comment for iWeekday in the params section implies 0 is allowed, but the first check in the function disallows it.
You also inconsistently put spaces after commas - please do in all cases.
Attaching a test with the patch would certainly help.
--Juan
On Thu, 02 Aug 2007 16:06:44 +0200, Juan Lang juan.lang@gmail.com wrote:
Thank you. Hope it will be better this time. Also, I'll send a test if this is OK.
This one looks pretty good to me, but I have one error and a few nits to correct:
The error:
- {
- ERR("GetLocaleInfo of 0x%x failed in 2nd stage?!\n", localeValue);
- SysFreeString(*pbstrOut);
You should set *pbstrOut to NULL in this case.
OK. However, note that this was copy&pasted, so there are more instances of this error in wine. It could be somehow automated (like having a macro for these disposing functions which will also set the pointer to NULL).
The nits: You have a couple small errors in the comments:
- You misspell iWeekday
- The comment for iWeekday in the params section implies 0 is allowed,
but the first check in the function disallows it.
This is the problem the misspelled comment is about, MSDN also suggest 0 for weekday is OK, however, disassemble showed it isn't on Win XP.
Attaching a test with the patch would certainly help.
I'm sending it to wine-patches.
Regards Jiri Palecek
On 8/2/07, Jiří Paleček jpalecek@web.de wrote:
On Thu, 02 Aug 2007 16:06:44 +0200, Juan Lang juan.lang@gmail.com wrote:
Thank you. Hope it will be better this time. Also, I'll send a test if this is OK.
This one looks pretty good to me, but I have one error and a few nits to correct:
The error:
- {
- ERR("GetLocaleInfo of 0x%x failed in 2nd stage?!\n", localeValue);
- SysFreeString(*pbstrOut);
You should set *pbstrOut to NULL in this case.
OK. However, note that this was copy&pasted, so there are more instances of this error in wine. It could be somehow automated (like having a macro for these disposing functions which will also set the pointer to NULL).
The nits: You have a couple small errors in the comments:
- You misspell iWeekday
- The comment for iWeekday in the params section implies 0 is allowed,
but the first check in the function disallows it.
This is the problem the misspelled comment is about, MSDN also suggest 0 for weekday is OK, however, disassemble showed it isn't on Win XP.
Are you disassembling native windows binaries?
On Fri, 03 Aug 2007 01:43:05 +0200, James Hawkins truiken@gmail.com wrote:
On 8/2/07, Jiří Paleček jpalecek@web.de wrote:
On Thu, 02 Aug 2007 16:06:44 +0200, Juan Lang juan.lang@gmail.com wrote:
Thank you. Hope it will be better this time. Also, I'll send a test if this is OK.
This one looks pretty good to me, but I have one error and a few nits to correct:
The error:
- {
- ERR("GetLocaleInfo of 0x%x failed in 2nd stage?!\n",
localeValue);
- SysFreeString(*pbstrOut);
You should set *pbstrOut to NULL in this case.
OK. However, note that this was copy&pasted, so there are more instances of this error in wine. It could be somehow automated (like having a macro for these disposing functions which will also set the pointer to NULL).
The nits: You have a couple small errors in the comments:
- You misspell iWeekday
- The comment for iWeekday in the params section implies 0 is allowed,
but the first check in the function disallows it.
This is the problem the misspelled comment is about, MSDN also suggest 0 for weekday is OK, however, disassemble showed it isn't on Win XP.
Are you disassembling native windows binaries?
Yes, is it a problem?
Jiri Palecek
On 8/2/07, Jiří Paleček jpalecek@web.de wrote:
On Fri, 03 Aug 2007 01:43:05 +0200, James Hawkins truiken@gmail.com wrote:
On 8/2/07, Jiří Paleček jpalecek@web.de wrote:
On Thu, 02 Aug 2007 16:06:44 +0200, Juan Lang juan.lang@gmail.com wrote:
Thank you. Hope it will be better this time. Also, I'll send a test if this is OK.
This one looks pretty good to me, but I have one error and a few nits to correct:
The error:
- {
- ERR("GetLocaleInfo of 0x%x failed in 2nd stage?!\n",
localeValue);
- SysFreeString(*pbstrOut);
You should set *pbstrOut to NULL in this case.
OK. However, note that this was copy&pasted, so there are more instances of this error in wine. It could be somehow automated (like having a macro for these disposing functions which will also set the pointer to NULL).
The nits: You have a couple small errors in the comments:
- You misspell iWeekday
- The comment for iWeekday in the params section implies 0 is allowed,
but the first check in the function disallows it.
This is the problem the misspelled comment is about, MSDN also suggest 0 for weekday is OK, however, disassemble showed it isn't on Win XP.
Are you disassembling native windows binaries?
Yes, is it a problem?
Yes it's not allowed in this project. Assuming you only disassembled oleaut32.dll, you will unfortunately not be able to contribute to that dll anymore for the Wine project.
Hello James/Wine.
1)
I noticed your comment the forums here: http://article.gmane.org/gmane.comp.emulators.wine.devel/52810
It was regarding the fact that it is not allowed to disassemble and reverse engineer Microsoft DLLs. I understand this part, as their license prohibits it (EULA).
However, i would be more clear if someone would make these rules commonly available on the WineHQ website. I tried to search for it but all i could find was:
http://www.winehq.org/site/developer-cheatsheet
"Disassembling native Windows DLLs is virtually always useless, as a technique disassemly is usually used to find out why the application is crashing in an otherwise unexplainable way."
This text does not make it sound prohibited (some might read is as an actual encouragement - (useless != probited)).
This should probably be fixed. It should make it crystal clear was is allowed and what is not. This would help avoid situation like the one mentioned above.
2)
Another problem is that i want to introduce something which i am not sure is covered or not by what is "not allowed".
I want to introduce a function which can check if SendMessage() or PostMessage() was the reason a message ended up in a Proc handler.
By browsing MSDN, i found out that i can accomplish this by using the documented function StalkWalk64(), which can examine the call stack. I would then introduce this into the test system for DLLs like "user32". By running the test on original Windows we could know which messages we are incorrectly "posting" or "sending" where it should have been the opposite. This could fix some vital issues.
I don't think there is a problem as i am just using documented APIs from MSDN, but since it includes looking at the call stack, i was curious if there might be a legal problem.
I don't want to put the idea to use or release it if it in any way is illegal.
Please think long and hard before you reply.
Thanks for your time,
/Pedro
On Sunday 05 August 2007 04:23:15 Peter Dons Tychsen wrote:
It was regarding the fact that it is not allowed to disassemble and reverse engineer Microsoft DLLs. I understand this part, as their license prohibits it (EULA).
Please note that "reverse engineering by disassembly" is not the same as "reverse engineering by black box testing". The former is not only disallowed by many license agreements, it's actually a violation of copyright in most (western) countries.
Reverse engineering by black box testing is an established and legal method in industry. Wine uses this method extensively by writing test cases.
However, i would be more clear if someone would make these rules commonly available on the WineHQ website.
[Omitting a quote about disassembly being useless]
This should probably be fixed. It should make it crystal clear was is allowed and what is not. This would help avoid situation like the one mentioned above.
It's also not allowed to break other laws while developing software. Where would you draw the line? Disassembling software is (almost always) illegal. Killing people is illegal. Should both be in the development guide? I would assume common sense would tell people that they should only do things that are legal.
Another problem is that i want to introduce something which i am not sure is covered or not by what is "not allowed".
I want to introduce a function which can check if SendMessage() or PostMessage() was the reason a message ended up in a Proc handler.
[...]
I don't think there is a problem as i am just using documented APIs from MSDN, but since it includes looking at the call stack, i was curious if there might be a legal problem.
If you are just using the documented API, this is just how Wine tests are done.
I don't want to put the idea to use or release it if it in any way is illegal.
This is the common sense I was talking about before. Thank you for asking.
Please think long and hard before you reply.
The usual disclaimer about how I'm not a lawyer and can't give legal advice applies, of course. But a rule of thumb is: "If you never looked at disassembled code and you are using tests using the Windows APIs to determine how the API you're interested in works, you're fine."
Hope that helps, Kai
On Sun, 2007-08-05 at 09:58 +0200, Kai Blin wrote:
On Sunday 05 August 2007 04:23:15 Peter Dons Tychsen wrote:
It was regarding the fact that it is not allowed to disassemble and reverse engineer Microsoft DLLs. I understand this part, as their license prohibits it (EULA).
Please note that "reverse engineering by disassembly" is not the same as "reverse engineering by black box testing". The former is not only disallowed by many license agreements, it's actually a violation of copyright in most (western) countries.
Reverse engineering by black box testing is an established and legal method in industry. Wine uses this method extensively by writing test cases.
However, i would be more clear if someone would make these rules commonly available on the WineHQ website.
[Omitting a quote about disassembly being useless]
This should probably be fixed. It should make it crystal clear was is allowed and what is not. This would help avoid situation like the one mentioned above.
It's also not allowed to break other laws while developing software. Where would you draw the line? Disassembling software is (almost always) illegal. Killing people is illegal. Should both be in the development guide? I would assume common sense would tell people that they should only do things that are legal.
Another problem is that i want to introduce something which i am not sure is covered or not by what is "not allowed".
I want to introduce a function which can check if SendMessage() or PostMessage() was the reason a message ended up in a Proc handler.
[...]
I don't think there is a problem as i am just using documented APIs from MSDN, but since it includes looking at the call stack, i was curious if there might be a legal problem.
If you are just using the documented API, this is just how Wine tests are done.
I don't want to put the idea to use or release it if it in any way is illegal.
This is the common sense I was talking about before. Thank you for asking.
Please think long and hard before you reply.
The usual disclaimer about how I'm not a lawyer and can't give legal advice applies, of course. But a rule of thumb is: "If you never looked at disassembled code and you are using tests using the Windows APIs to determine how the API you're interested in works, you're fine."
Hope that helps, Kai
Thanks for your comments Kai.
It's also not allowed to break other laws while developing software. Where would you draw the line? Disassembling software is (almost always) illegal. Killing people is illegal. Should both be in the development guide? I would assume common sense would tell people that they should only do things that are legal.
I thing killing is a bit off topic :-)
However i do get your point about making it clear. It would be difficult to handle. OK, but changing the text i referred to would be a good start though.
The text could be changed to (or similar):
"Disassembling native Windows DLLs is not allowed in the Wine project due to legal implications. However, this does not change much, as disassembling native Windows DLLs is virtually always useless, as as technique disassemly is usually used to find out why the application is crashing in an otherwise unexplainable way."
On Sun, 2007-08-05 at 17:27 +0200, Peter Dons Tychsen wrote:
On Sun, 2007-08-05 at 09:58 +0200, Kai Blin wrote:
On Sunday 05 August 2007 04:23:15 Peter Dons Tychsen wrote:
It was regarding the fact that it is not allowed to disassemble and reverse engineer Microsoft DLLs. I understand this part, as their license prohibits it (EULA).
Please note that "reverse engineering by disassembly" is not the same as "reverse engineering by black box testing". The former is not only disallowed by many license agreements, it's actually a violation of copyright in most (western) countries.
Reverse engineering by black box testing is an established and legal method in industry. Wine uses this method extensively by writing test cases.
However, i would be more clear if someone would make these rules commonly available on the WineHQ website.
[Omitting a quote about disassembly being useless]
This should probably be fixed. It should make it crystal clear was is allowed and what is not. This would help avoid situation like the one mentioned above.
It's also not allowed to break other laws while developing software. Where would you draw the line? Disassembling software is (almost always) illegal. Killing people is illegal. Should both be in the development guide? I would assume common sense would tell people that they should only do things that are legal.
Another problem is that i want to introduce something which i am not sure is covered or not by what is "not allowed".
I want to introduce a function which can check if SendMessage() or PostMessage() was the reason a message ended up in a Proc handler.
[...]
I don't think there is a problem as i am just using documented APIs from MSDN, but since it includes looking at the call stack, i was curious if there might be a legal problem.
If you are just using the documented API, this is just how Wine tests are done.
I don't want to put the idea to use or release it if it in any way is illegal.
This is the common sense I was talking about before. Thank you for asking.
Please think long and hard before you reply.
The usual disclaimer about how I'm not a lawyer and can't give legal advice applies, of course. But a rule of thumb is: "If you never looked at disassembled code and you are using tests using the Windows APIs to determine how the API you're interested in works, you're fine."
Hope that helps, Kai
Thanks for your comments Kai.
It's also not allowed to break other laws while developing software. Where would you draw the line? Disassembling software is (almost always) illegal. Killing people is illegal. Should both be in the development guide? I would assume common sense would tell people that they should only do things that are legal.
I thing killing is a bit off topic :-)
However i do get your point about making it clear. It would be difficult to handle. OK, but changing the text i referred to would be a good start though.
The text could be changed to (or similar):
"Disassembling native Windows DLLs is not allowed in the Wine project due to legal implications. However, this does not change much, as disassembling native Windows DLLs is virtually always useless, as as technique disassemly is usually used to find out why the application is crashing in an otherwise unexplainable way."
OK. I will go ahead and post my proposals. Thank you for helping out. Always good to be on the safe side.
/Pedro
On Sunday 05 August 2007 17:27:23 you wrote:
Thanks for your comments Kai.
My pleasure.
It's also not allowed to break other laws while developing software. Where would you draw the line? Disassembling software is (almost always) illegal. Killing people is illegal. Should both be in the development guide? I would assume common sense would tell people that they should only do things that are legal.
I thing killing is a bit off topic :-)
Sure. I was exaggerating. :)
However i do get your point about making it clear. It would be difficult to handle. OK, but changing the text i referred to would be a good start though.
The text could be changed to (or similar):
"Disassembling native Windows DLLs is not allowed in the Wine project due to legal implications. However, this does not change much, as disassembling native Windows DLLs is virtually always useless, as as technique disassemly is usually used to find out why the application is crashing in an otherwise unexplainable way."
That would probably help. Feel free to send a patch to the website.
Cheers, Kai
Kai Blin wrote:
On Sunday 05 August 2007 04:23:15 Peter Dons Tychsen wrote:
It was regarding the fact that it is not allowed to disassemble and reverse engineer Microsoft DLLs. I understand this part, as their license prohibits it (EULA).
Please note that "reverse engineering by disassembly" is not the same as "reverse engineering by black box testing". The former is not only disallowed by many license agreements, it's actually a violation of copyright in most (western) countries.
Not all western countries by far.
Reverse engineering by black box testing is an established and legal method in industry. Wine uses this method extensively by writing test cases.
However, i would be more clear if someone would make these rules commonly available on the WineHQ website.
[Omitting a quote about disassembly being useless]
This should probably be fixed. It should make it crystal clear was is allowed and what is not. This would help avoid situation like the one mentioned above.
It's also not allowed to break other laws while developing software. Where would you draw the line? Disassembling software is (almost always) illegal. Killing people is illegal. Should both be in the development guide? I would assume common sense would tell people that they should only do things that are legal.
Dissambling is not illegal. Disassembling and then writing another implementation is against copyright. [snip MSDN etc]
This is the common sense I was talking about before. Thank you for asking.
Please think long and hard before you reply.
The usual disclaimer about how I'm not a lawyer and can't give legal advice applies, of course. But a rule of thumb is: "If you never looked at disassembled code and you are using tests using the Windows APIs to determine how the API you're interested in works, you're fine."
I also can't see how it would be illegal to, for instance, person A disassembling a DLL, then writing documentation for that DLL. Then for person B to reimplement said DLL by means of the specification specified by person A.
This is how Compaq legally reverse engineered the IBM PC BIOS. I don't see how there would be any difference writing the documentation as unit tests or english.
I.e. disassembling for the purpose of creating unit tests must be ok, AFAIK.
regards, Jakob
On Sunday 05 August 2007 18:06:28 Jakob Eriksson wrote:
Kai Blin wrote:
On Sunday 05 August 2007 04:23:15 Peter Dons Tychsen wrote:
It was regarding the fact that it is not allowed to disassemble and reverse engineer Microsoft DLLs. I understand this part, as their license prohibits it (EULA).
Please note that "reverse engineering by disassembly" is not the same as "reverse engineering by black box testing". The former is not only disallowed by many license agreements, it's actually a violation of copyright in most (western) countries.
Not all western countries by far.
[...]
Dissambling is not illegal. Disassembling and then writing another implementation is against copyright. [snip MSDN etc]
Well, I'm talking about "in the context of using the results for Wine". I was also simplifying. However, given that the USA seem to consider the internet to be under their jurisdiction, the US legal system seems to be par for the interpretation of all of this.
I also can't see how it would be illegal to, for instance, person A disassembling a DLL, then writing documentation for that DLL. Then for person B to reimplement said DLL by means of the specification specified by person A.
This is how Compaq legally reverse engineered the IBM PC BIOS. I don't see how there would be any difference writing the documentation as unit tests or english.
I.e. disassembling for the purpose of creating unit tests must be ok, AFAIK.
Why would you even bother to disassemble to write a unit test? All Wine cares about is "What's the output of function X when I put in Y and Z as parameters?". That's why you write a conformance test that will run on Windows. Then you make Wine behave the same. No need to disassemble anything there.
Cheers, Kai
Kai Blin wrote:
Why would you even bother to disassemble to write a unit test? All Wine cares about is "What's the output of function X when I put in Y and Z as parameters?". That's why you write a conformance test that will run on Windows. Then you make Wine behave the same. No need to disassemble anything there.
That is very true. There's no need.
regards, Jakob
Peter Dons Tychsen wrote:
By browsing MSDN, i found out that i can accomplish this by using the documented function StalkWalk64(), which can examine the call stack. I would then introduce this into the test system for DLLs like "user32". By running the test on original Windows we could know which messages we are incorrectly "posting" or "sending" where it should have been the opposite. This could fix some vital issues.
I don't think there is a problem as i am just using documented APIs from MSDN, but since it includes looking at the call stack, i was curious if there might be a legal problem.
I don't want to put the idea to use or release it if it in any way is illegal.
Please think long and hard before you reply.
DMCA Reverse engineering exemption:
http://www.chillingeffects.org/reverse/faq.cgi#QID210
regards, Jakob
On 8/5/07, Jakob Eriksson jakob@vmlinux.org wrote:
Peter Dons Tychsen wrote:
By browsing MSDN, i found out that i can accomplish this by using the documented function StalkWalk64(), which can examine the call stack. I would then introduce this into the test system for DLLs like "user32". By running the test on original Windows we could know which messages we are incorrectly "posting" or "sending" where it should have been the opposite. This could fix some vital issues.
I don't think there is a problem as i am just using documented APIs from MSDN, but since it includes looking at the call stack, i was curious if there might be a legal problem.
I don't want to put the idea to use or release it if it in any way is illegal.
Please think long and hard before you reply.
DMCA Reverse engineering exemption:
From the article:
"The reverse engineer is required to ask permission first, however."
...good luck with that.
Am Montag, 6. August 2007 21:02 schrieb James Hawkins:
"The reverse engineer is required to ask permission first, however."
...good luck with that.
Asking is easy :-)
Does the reverse engineer have to get permission? If he does need the blessing of the creator of the reverse engineered software/device, then the whole interoperability clause would be pointless. (note that I didn't read the DMCA, nor that page since disassembling Windows is pointless for me and I do not really speak assembler)
On 8/6/07, Stefan Dösinger stefandoesinger@gmx.at wrote:
Am Montag, 6. August 2007 21:02 schrieb James Hawkins:
"The reverse engineer is required to ask permission first, however."
...good luck with that.
Asking is easy :-)
Does the reverse engineer have to get permission? If he does need the blessing of the creator of the reverse engineered software/device, then the whole interoperability clause would be pointless. (note that I didn't read the DMCA, nor that page since disassembling Windows is pointless for me and I do not really speak assembler)
While living in America and going to school seeking a computer related degree, I had to take an ethics class on the industry. I did a presentation on the DMCA. Yes, the DMCA seems to be written such that any reverse engineering has to be done with the permission of the author or done in a very academic sense. Definitely no black hats...
Now, where the DMCA concerns us, is whether you engage in circumvention technology. As far as Wine as concerned, it is not being written for that, and we don't really engage in reverse engineering in the sense of the way the DMCA is written for or against. But then again a court can totally change the meaning here.
James Hawkins wrote:
On 8/5/07, Jakob Eriksson jakob@vmlinux.org wrote:
DMCA Reverse engineering exemption:
From the article:
"The reverse engineer is required to ask permission first, however."
...good luck with that.
It is strange that the say that, because I can not find anything about asking permission in the actual law text:
http://cyber.law.harvard.edu/openlaw/DVD/1201.html#f
regards, Jakob
On 8/7/07, Jakob Eriksson jakob@vmlinux.org wrote:
James Hawkins wrote:
On 8/5/07, Jakob Eriksson jakob@vmlinux.org wrote:
DMCA Reverse engineering exemption:
From the article:
"The reverse engineer is required to ask permission first, however."
...good luck with that.
It is strange that the say that, because I can not find anything about asking permission in the actual law text:
Here I think: 1201a, 3b.
'a technological measure ''effectively controls access to a work'' if the measure, in the ordinary course of its operation, requires the application of information, or a process or a treatment, with the authority of the copyright owner, to gain access to the work.'