Re: [xHarbour-developers] Upper() and codepage.

2009-03-13 Thread Ron Pinkas
Przemek,

Many thanks for the sample, It should be fixed after: 2009-03-13 23:58 
UTC-0430 Ron Pinkas . Please let me know if I missed 
something.

In my tests of Clipper's protection of GetList, I did encounter some 
unexplainable results, but sadly I did not keep those tests. IIRC some of 
the oddities involved using the ADDITIVE clause, with and without a 
restorable value for GetList. Additionally it seems I confused CLEAR ALL 
with CLEAR MEMORY, in some tests, which apparently threw me off, due to 
inclusion of GetList := {} in translation of that command.

Again, many thanks for your assistance.

Ron

--
From: "Przemyslaw Czerpak" 
Sent: Thursday, March 12, 2009 11:28 AM
To: "Xharbour-Developers List" 
Subject: Re: [xHarbour-developers] Upper() and codepage.

> On Thu, 12 Mar 2009, Ron Pinkas wrote:
>
> Hi,
>
>> I still noticed some minor incompatibility which appears to be a Clipper
>> bug, or at least I haven't been able to decipher the logic. IAE it 
>> manifests
>> in very rare condition which I doubt any user is even aware of the odd
>> behavior
>
> Can you create any .prg example which gives different results in Clipper
> then in Harbour?
> For me the Clipper behavior is very simple.
> CLEAR MEMORY called explicitly or indirectly by RESTORE FROM ...
> without ADDITIVE clause clears all private variables and then all
> public variables except GetList. That's all. At least in such
> way works current Harbour HVM and I cannot find any incompatibilities
> to Clipper here. The only one place where Harbour may give different
> results then Clipper is fixed CLEAR MEMORY executed when some PRIVATE
> variables exist. Clipper is seriously buggy here. xHarbour also though
> the results of probably the same bug are different. Clipper gives
> wrong values accessing some itmes freed before but not released by GC
> and xHarbour usually GPFs though in the last years the GPF place was
> changing. It's memory corruption bug so it's expected.
> I was reporting this bug over two years ago to this list. You can find it
> in the mail list archive.
> Here is self contain example from the message I sent:
>
>   /*
>* Unworking CLEAR MEMORY (this bug exists also in Clipper). In xHarbour
>* it may give some unexpected results or GPF. In Harbour has been 
> fixed.
>*/
>   memvar V, V2
>   proc main()
>  local oErr
>
>  ? "Clipper results:"
>  ? "V:1 V:1 V:1"
>  ? "V:2 V:2 V:2"
>  ? "V:2 V:2"
>  ? "V2:1 V2:1 V:3 V2:1"
>  ? "L:1 L:1 V:3 L:1"
>  ? "Variable V does not exist."
>  ?
>  ? "Expected results:"
>  ? "V:1 V:1 V:1"
>  ? "V:2 V:2 V:2"
>  ? "V:2 V:2"
>  ? "V:2 V:2 V:3 V2:1"
>  ? "L:1 L:1 V:3 V2:1"
>  ? "Variable V does not exist."
>  ?
>  ? "Current results:"
>
>  private V := "V:1"
>  f(@v)
>  errorblock({|oErr|break(oErr)})
>  ? "Variable V "
>  begin sequence
> ?? "is:", V
>  recover using oErr
> ?? "does not exist."
>  end sequence
>   return
>
>   func f(l)
>  local cb:={||l}
>  ? eval(cb), l, v
>  V := "V:2"
>  ? eval(cb), l, v
>  CLEAR MEMORY
>  ? eval(cb), l
>  private V2 := "V2:1"
>  private V := "V:3"
>  ? eval(cb), l, v, v2
>  l:="L:1"
>  ? eval(cb), l, v, v2
>   return cb
>
> Just try this code with current xHarbour version.
> Of course Instead of CLEAR MEMORY you can use RESTORE FROM without
> ADDITIVE - it makes internally the same job - tries to clear all
> existing memvar values.
>
> Please also note that this bug may interact with your results when you are
> testing what happens creating some chain of PRIVATE GetList variables and
> then calling RESTORE FROM / CLEAR MEMORY.
>
>> I'll be thankful if you can help me understand Clipper results for:
>> //---//
>> MEMVAR GetLis
>> PROCEDURE Main()
>>   ? ProcLine(), GetList
>>   PrivateGet()
>>   ? ProcLine(), GetList
>> RETURN
>> PROCEDURE PrivateGet()
>>PRIVATE GetList := "Private"
>>SAVE TO Test ALL
>>OtherPrivateGet()
>>? ProcLine(), GetList
>> RETURN // Should we not get back to PUBLIC visibility here?
>
> We are at public visibility here. Just simply the public varible
> GetList value is set by RESTORE FROM to "Private".
> The problem is that xHarbour does not reset all memvars offsetes
> pushed with function frames inside CLEAR MEMORY but releases all
> existing memvars and then tries to restore them.
> My example above shows what may happen in such case, f.e. it GPFs
> with current xHarbour in Linux GCC builds.
>
>> PROCEDURE OtherPrivateGet()
>>RESTORE FROM Test //ADDITIVE
>>? ProcLine(), GetList
>> RETURN
>> INIT PROCEDURE MyInit()
>>GetList := "Public"
>> RETURN
>
> I think you should start from fixing the xHarbour memvars code so the
> example I sent will work without any problems giving expected results.
> Below is result of valgrind test.
> HTH
>
> best regard

[xHarbour-developers] 2009-03-13 23:58 UTC-0430 Ron Pinkas

2009-03-13 Thread Ron Pinkas
2009-03-13 23:58 UTC-0430 Ron Pinkas 
   * mdir.bat
   * bin/bld_vc.bat
 * Typo and ommisions

   * source/vm/hvm.c
 * Corrected few missing setting of item.asLong.length

   * source/vm/hash.c
 + Added missing prg callable HB_HASHID(), symetric with HB_ARRAID()

   * include/hbxvm.h
   * source/compiler/gencc.c
   * include/hbvmpub.h
   * source/vm/itemapi.c
   * source/vm/hvm.c
 + Added member privatesbase to HB_SYMBCARGO
 * Removed all ulPrivateBase in favor of new 
item.asSymbol.pCargo->privatesbase
   so that CLEAR MEMORY & RESTORE FROM could reset stack frames' private 
base information
   by means of new hb_memvarClearAll()

   * include/hbstack.h
   * source/vm/estack.c
 + Added set/reset of new item.asSymbol.pCargo->privatesbase to 
hb_stackFrame()
 + Added hb_stackClearPrivateBases() to service new hb_memvarClearAll()

   * source/vm/memvars.c
 * __MVRESTORE() with out ADDITIVE caluse and __MVCLEAR() to use new 
shared worker, hb_memvarClearAll()
 + New worker hb_memvarClearAll() adds:
 + Call hb_stackClearPrivateBases() to advise existing frames of 
privates removal
 + Explicit reset of privates (s_privateStack)
 * Correct Clipper compatible protection of PUBLIC GetList
 


--
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
___
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers


Re: [xHarbour-developers] ChangeLog 2009-03-07 16:47 UTC+0300PhilKrylov

2009-03-13 Thread Luiz Rafael Culik Guimaraes
Phil

i just tryed current  CVS on my suse 10.3 distro with make 3.80

i get when calling make or make_gnu.sh

config/dir.cf:55: *** missing `endif'.  Stop.


Regards
Luiz

--
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
___
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers


Re: [xHarbour-developers] ChangeLog 2009-03-07 16:47 UTC+0300PhilKrylov

2009-03-13 Thread Phil Krylov
On Fri, Mar 13, 2009 at 1:33 PM, Xharbour suporte  wrote:
> Fri, 13 Mar 2009 11:43:30 +0300, Phil Krylov  escreveu:
>
>> Hi,
>>
>> On Fri, Mar 13, 2009 at 5:27 AM, Luiz Rafael Culik Guimaraes
>>  wrote:
>> > I just downloaded current CVS on an linux 64bits machine, and when i try to
>> > compile it give an error that an endif is missing on line 55
>> > make version 3.80
>>
>> line 55 of which file? Are you sure you don't have local
>> modifications? Here (Gentoo Linux/amd64, make 3.81) it builds ok.
>>
> config/dir.cf

Can you please forward an exact error message? There is no if on that
line, and I don't see any endif's missing.

-- Ph.

--
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
___
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers


Re: [xHarbour-developers] ChangeLog 2009-03-07 16:47 UTC+0300PhilKrylov

2009-03-13 Thread Xharbour suporte
config/dir.cf

Atenciosamente
Luiz Rafael Culik Guimaraes
Suporte Xharbour
www.xharbour.com.br





Fri, 13 Mar 2009 11:43:30 +0300, Phil Krylov  escreveu:

> Hi,
> 
> On Fri, Mar 13, 2009 at 5:27 AM, Luiz Rafael Culik Guimaraes
>  wrote:
> > I just downloaded current CVS on an linux 64bits machine, and when i try to
> > compile it give an error that an endif is missing on line 55
> > make version 3.80
> 
> line 55 of which file? Are you sure you don't have local
> modifications? Here (Gentoo Linux/amd64, make 3.81) it builds ok.
> 
> -- Ph.
> 
> --
> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
> easily build your RIAs with Flex Builder, the Eclipse(TM)based development
> software that enables intelligent coding and step-through debugging.
> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
> ___
> xHarbour-developers mailing list
> xHarbour-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xharbour-developers
> 
> 
> 
> 

--
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
___
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers


Re: [xHarbour-developers] ChangeLog 2009-03-07 16:47 UTC+0300 PhilKrylov

2009-03-13 Thread Phil Krylov
Hi,

On Fri, Mar 13, 2009 at 5:27 AM, Luiz Rafael Culik Guimaraes
 wrote:
> I just downloaded current CVS on an linux 64bits machine, and when i try to
> compile it give an error that an endif is missing on line 55
> make version 3.80

line 55 of which file? Are you sure you don't have local
modifications? Here (Gentoo Linux/amd64, make 3.81) it builds ok.

-- Ph.

--
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
___
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers