Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use int64 for MaxInt48 to compile in x86 arch #521

Merged
merged 5 commits into from
Sep 13, 2023

Conversation

CrazyHarb
Copy link
Contributor

fix error " MinInt48 (untyped int constant -140737488355328) overflows int" when compile by gox86 on windows.

@CLAassistant
Copy link

CLAassistant commented Sep 4, 2023

CLA assistant check
All committers have signed the CLA.

@ii64
Copy link
Contributor

ii64 commented Sep 4, 2023

This is a fix for any non 64-bit host system

@@ -17,20 +17,20 @@
package rt

const (
MinInt48 = -(1 << 47)
MaxInt48 = +(1 << 47) - 1
MinInt48 int64 = -(1 << 47)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, maybe use 4 spaces instead of a tab~

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@liuq19
Copy link
Collaborator

liuq19 commented Sep 4, 2023

thanks for your pr, The branch name is invalid in the CI, maybe we need to fix it to merge into master~

@CrazyHarb
Copy link
Contributor Author

thanks for your pr, The branch name is invalid in the CI, maybe we need to fix it to merge into master~

It was nothing. I'm just glad it's working for ya.

@ii64
Copy link
Contributor

ii64 commented Sep 4, 2023

Honestly even if it was able to be compiled for 386/x86, the JIT compiler only supports amd64 ABI.

@CrazyHarb
Copy link
Contributor Author

Honestly even if it was able to be compiled for 386/x86, the JIT compiler only supports amd64 ABI.

I wants to build ONE program and expect it to run on both of the x86 & x64 version of the windows , so I MUST choose the x86 program.

@liuq19 liuq19 changed the title fix compile by go x86 on windows fix: use int64 for MaxInt48 to compile in x86 arch Sep 13, 2023
@liuq19 liuq19 enabled auto-merge (squash) September 13, 2023 06:06
@liuq19 liuq19 merged commit 73a97ab into bytedance:main Sep 13, 2023
24 checks passed
kodiakhq bot pushed a commit to cloudquery/plugin-pb-go that referenced this pull request Nov 1, 2023
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/bytedance/sonic](https://togithub.com/bytedance/sonic) | indirect | patch | `v1.10.1` -> `v1.10.2` |

---

### Release Notes

<details>
<summary>bytedance/sonic (github.com/bytedance/sonic)</summary>

### [`v1.10.2`](https://togithub.com/bytedance/sonic/releases/tag/v1.10.2)

[Compare Source](https://togithub.com/bytedance/sonic/compare/v1.10.1...v1.10.2)

#### Bugfix

-   \[[#&#8203;521](https://togithub.com/bytedance/sonic/issues/521)] use int64 for MaxInt48 to compile in x86 arch
-   \[[#&#8203;530](https://togithub.com/bytedance/sonic/issues/530)] unnecessary ptr check `json.Unmarshaler`
-   \[[#&#8203;531](https://togithub.com/bytedance/sonic/issues/531)] missing write-barrier when truncate empty slice
-   \[[#&#8203;533](https://togithub.com/bytedance/sonic/issues/533)] not use rbp in JIT

#### New Contributors

-   [@&#8203;ancientmodern](https://togithub.com/ancientmodern) made their first contribution in [bytedance/sonic#528
-   [@&#8203;CrazyHarb](https://togithub.com/CrazyHarb) made their first contribution in [bytedance/sonic#521

**Full Changelog**: bytedance/sonic@v1.10.1...v1.10.2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMDkuNCIsInVwZGF0ZWRJblZlciI6IjM2LjEwOS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
kodiakhq bot pushed a commit to cloudquery/plugin-sdk that referenced this pull request Nov 1, 2023
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/bytedance/sonic](https://togithub.com/bytedance/sonic) | indirect | patch | `v1.10.1` -> `v1.10.2` |

---

### ⚠ Dependency Lookup Warnings ⚠

Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information.

---

### Release Notes

<details>
<summary>bytedance/sonic (github.com/bytedance/sonic)</summary>

### [`v1.10.2`](https://togithub.com/bytedance/sonic/releases/tag/v1.10.2)

[Compare Source](https://togithub.com/bytedance/sonic/compare/v1.10.1...v1.10.2)

##### Bugfix

-   \[[#&#8203;521](https://togithub.com/bytedance/sonic/issues/521)] use int64 for MaxInt48 to compile in x86 arch
-   \[[#&#8203;530](https://togithub.com/bytedance/sonic/issues/530)] unnecessary ptr check `json.Unmarshaler`
-   \[[#&#8203;531](https://togithub.com/bytedance/sonic/issues/531)] missing write-barrier when truncate empty slice
-   \[[#&#8203;533](https://togithub.com/bytedance/sonic/issues/533)] not use rbp in JIT

##### New Contributors

-   [@&#8203;ancientmodern](https://togithub.com/ancientmodern) made their first contribution in [bytedance/sonic#528
-   [@&#8203;CrazyHarb](https://togithub.com/CrazyHarb) made their first contribution in [bytedance/sonic#521

**Full Changelog**: bytedance/sonic@v1.10.1...v1.10.2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMDkuNCIsInVwZGF0ZWRJblZlciI6IjM2LjEwOS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants