[OpenSmalltalk/opensmalltalk-vm] MUSL deltas (mostly harmless) (#450)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
29 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] MUSL deltas (mostly harmless) (#450)

David T Lewis
 

@nicolas-cellier-aka-nice commented on this pull request.


In platforms/unix/plugins/SecurityPlugin/sqUnixSecurity.c:

> @@ -213,7 +213,8 @@ ioInitSecurity(void)
   if (imagePathLen)
     strncpy(secureUserDirectory, imageName, imagePathLen);
   else {
-    getwd(secureUserDirectory);
+/*@@MUSL@@*/
+    getcwd(secureUserDirectory, imagePathLen);

Does it work? We're passing imagePathLen==0 here.
Shouldn't it be the buffer size, MAXPATHLEN?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/450?email_source=notifications\u0026email_token=AIJPEW5MPA2Y45FSHP54ILTQ2HMGPA5CNFSM4JYBTAVKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCQEULYQ#pullrequestreview-336152034", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/450?email_source=notifications\u0026email_token=AIJPEW5MPA2Y45FSHP54ILTQ2HMGPA5CNFSM4JYBTAVKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCQEULYQ#pullrequestreview-336152034", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] MUSL deltas (mostly harmless) (#450)

David T Lewis
In reply to this post by David T Lewis
 
On 2019-12-24 01:51, Nicolas Cellier wrote:

> @NICOLAS-CELLIER-AKA-NICE commented on this pull request.
> -------------------------
>
> In platforms/Cross/vm/sqSCCSVersion.h:
>
>> @@ -28,13 +28,13 @@
>
> #if SUBVERSION
> # define PREFIX "r"
> -static char SvnRawRevisionString[] = "$Rev$";
> +static char SvnRawRevisionString[] = "$Rev: 201911192350 $";
>
> Idem, please revert the changes to this file

Yes. I noted in the earlier post that I don't know how to do this
(trivial git user).

How would I do this?

Thanks,
-KenD


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/450?email_source=notifications\u0026email_token=AIJPEWY67WO77ERVUEJK7TLQ2I36JA5CNFSM4JYBTAVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHTNRYY#issuecomment-568776931", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/450?email_source=notifications\u0026email_token=AIJPEWY67WO77ERVUEJK7TLQ2I36JA5CNFSM4JYBTAVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHTNRYY#issuecomment-568776931", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] MUSL deltas (mostly harmless) (#450)

David T Lewis
In reply to this post by David T Lewis
 

@KenDickey pushed 1 commit.

  • 341fd8b getCed now uses MAXPATHLEN


You are receiving this because you are subscribed to this thread.
View it on GitHub or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/450/files/efb837d8e2a4efa2e2a610ebae2df24feab507de..341fd8b0f7da32c3e32c05c100c7fae70b045820?email_source=notifications\u0026email_token=AIJPEW7RINZXXKBNZDXUCK3Q2I4MBA5CNFSM4JYBTAVKYY3PNVWWK3TUL52HS4DFXNIHK3DMKJSXC5LFON2FA5LTNBHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZF5KB2WY3BDGM2TANBXG43DGMCQOVZWQIZUGQZTEOJTGAZDCNA", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/450/files/efb837d8e2a4efa2e2a610ebae2df24feab507de..341fd8b0f7da32c3e32c05c100c7fae70b045820?email_source=notifications\u0026email_token=AIJPEW7RINZXXKBNZDXUCK3Q2I4MBA5CNFSM4JYBTAVKYY3PNVWWK3TUL52HS4DFXNIHK3DMKJSXC5LFON2FA5LTNBHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZF5KB2WY3BDGM2TANBXG43DGMCQOVZWQIZUGQZTEOJTGAZDCNA", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] MUSL deltas (mostly harmless) (#450)

David T Lewis
In reply to this post by David T Lewis
 

@KenDickey pushed 1 commit.


You are receiving this because you are subscribed to this thread.
View it on GitHub or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/450/files/341fd8b0f7da32c3e32c05c100c7fae70b045820..26e0966d01cc80da85be6b7183ba676d5bf11c34?email_source=notifications\u0026email_token=AIJPEW2NCDWUTLWKJ6ZHKSLQ2I5NNA5CNFSM4JYBTAVKYY3PNVWWK3TUL52HS4DFXNIHK3DMKJSXC5LFON2FA5LTNBHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZF5KB2WY3BDGM2TANBXG43DGMCQOVZWQIZUGQZTEOJUGY4TIMY", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/450/files/341fd8b0f7da32c3e32c05c100c7fae70b045820..26e0966d01cc80da85be6b7183ba676d5bf11c34?email_source=notifications\u0026email_token=AIJPEW2NCDWUTLWKJ6ZHKSLQ2I5NNA5CNFSM4JYBTAVKYY3PNVWWK3TUL52HS4DFXNIHK3DMKJSXC5LFON2FA5LTNBHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZF5KB2WY3BDGM2TANBXG43DGMCQOVZWQIZUGQZTEOJUGY4TIMY", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: Slang's type inference and typing

pierre misse
In reply to this post by Eliot Miranda-2
 

Hi,


It's been a ... Long couple of months.
I wanted to find the time to contribute the few tests I have, but was not able to find time to do so.
I join them to this email (lamely) as .st. They are available on my github fork, in the SlangTranslation branch aswell: [hidden email].

I had to move on from them quite quickly so some stuff is very basic, but this is still a start.
I tagged with self assert: false the tests results I thought were weird, with a comment of what I expected.

I was not able to look at what you pointed me to, sorry Eliot.

Hope this will help, have a nice day !


Pierre


On 18/12/2019 09:25, Eliot Miranda wrote:
 

Hi Pierre,

On Tue, Dec 17, 2019 at 10:36 PM pierre misse <[hidden email]> wrote:
 


On 18/12/2019 03:52, Eliot Miranda wrote:
 

Hi Pierre,

On Tue, Dec 17, 2019 at 9:50 AM pierre misse <[hidden email]> wrote:
 

Hi,

I saw my previous mistake, and corrected this.
This is a sample test, for a very simple inference.

testReturnFloatConstantNode
    | ccg tMethod |
    ccg := CCodeGenerator new.
    ccg addClass: SlangTypeInferenceTestsClass.
    ccg inferTypesForImplicitlyTypedVariablesAndMethods.
    tMethod := ccg methodNamed: #returnAFloatConstantNode.
   
    self assert: tMethod isNotNil.
    self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #double.
    self assert: tMethod returnType equals: #double


 And perhaps have SlangTypeInferenceTestsClass inherit from StackInterpreter or InterpreterPrimitives.  That will give you much more context.

I was currently inheriting from interpreterPlugin, but I can indeed switch.


I think you have it right.   interpreterPlugin should be fine.

My tests currently were as simple as it gets:

constantNode
Returm constant
return Explicit argument
return Explicit Temporary
return temp assigned by constant.

So it wasn't necessary.

Only surprising result is the return temp assigned by constant, which loses the type. This seems to be easily improvable in the future if you'd like.

returnTempFloatConstantNode
    | t |
    t := 1.0.
    ^ t

Its its return type isn't inferred to be #double then that's a bug.

testReturnTempFloatConstantNode
    | ccg tMethod |
    ccg := CCodeGenerator new.
    ccg addClass: SlangTypeInferenceTestsClass.
    ccg inferTypesForImplicitlyTypedVariablesAndMethods.
    tMethod := ccg methodNamed: #returnTempFloatConstantNode.
   
    self assert: tMethod isNotNil.
    self assert: (ccg typeFor: tMethod statements first in: tMethod) equals: #double.
    self assert: (ccg typeFor: tMethod statements first variable in: tMethod) equals: #sqInt.
    self assert: tMethod returnType equals: #sqInt.


 Well, t is untyped and it is assigned a double.  So I would expect that the inferencer infer the ty[e #double for f.  Then it should infer the type #double for  returnTempFloatConstantNode since it answers t.    
 

    self error "wait what"



 I need to work on ones with ambiguity.


 The instability I saw was in getErrorObjectFromPrimFailCode; its two locals clone & errObj are sometimes typed as squint and sometimes as usqInt.  Some times numPointerSlotsOf ends up with a return type of usqInt, some times as sqInt.  I've recently had success in another project substituting OrderedDictionary et al for Dictionary.  So I'm sure that solutions can be found easily.
 

Thanks for the pointer !


Pierre


Thanks for looking!!  It will be great to have tests for this, if only for good documentation.  I never had the time, and always look at the diffs of the generated code.  But that doesn't mean I don't want these tests.  Thank you for your energy!
 
_,,,^..^,,,_
best, Eliot

typing-tests.zip (13K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] MUSL deltas (mostly harmless) (#450)

David T Lewis
In reply to this post by David T Lewis
 

Greetings all,

The vm-display-fbdev (a.k.a. framebuffer display) has been integrated
into opensmalltalk-vm.
Thanks Eliot!

This has been tested with both Squeak and Cuis images on amd64 and
arm64/aarch64.

This requires Linux framebuffer support (/dev/fb0) and libevdev
('/usr/include/libevdev-1.0/libevdev/libevdev.h').

Hardware tested:
LePotato (aml-s905x-cc; Armbian Linux; libc)
Raspberry Pi 3 & 4 (Alpine Linux; MUSL)
A very old Dell amd64 box (Alpine Linux; MUSL)

Right now the MUSL builds require manual help.

E.g.
cd build.linux64ARMv8/squeak.cog.spur/build
./mvm
y ## answer to 'clean?'
--> breaks on vm-display-fbdev build
cd vm-display-fbdev
make
cd ..
./mvm
n ## answer NO to 'clean?'

The build then proceeds to completion and checks out fine.

Does anyone out there know about how to get 'automake'
('platforms/unix/config/configure' script) to do the right thing here?

Desired goal is for
-DMUSL
and
-DUSEEVDEV
CFLAGS to be set and have the 'mvm' script make vm-display-fbdev without
manual intervention.

Thanks a bunch for any help!
-KenD


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/450#issuecomment-687674852", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/450#issuecomment-687674852", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] MUSL deltas (mostly harmless) (#450)

David T Lewis
In reply to this post by David T Lewis
 

I think with the landing of #515, most things here are obsolete, and others need different treatment.
Mind if I close?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/450#issuecomment-690595352", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/450#issuecomment-690595352", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] MUSL deltas (mostly harmless) (#450)

David T Lewis
In reply to this post by David T Lewis
 

On 2020-09-10 11:15, Tobias Pape wrote:

> I think with the landing of #515, most things here are obsolete, and
> others need different treatment.
> Mind if I close?

Yep. Ole news. Please close.

Thanks,
-KenD


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/450#issuecomment-690607077", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/450#issuecomment-690607077", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] MUSL deltas (mostly harmless) (#450)

David T Lewis
In reply to this post by David T Lewis
 

Closed #450.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/450#event-3752563253", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/450#event-3752563253", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
12