huandu / go-tls

A bit safer approach to implement Thread Local Storage (TLS) for Go 1.7+.
MIT License
162 stars 15 forks source link

Put the backwards compatibility code #11

Closed xiekeyi98 closed 2 years ago

xiekeyi98 commented 2 years ago

Because #10 It will be broken when running rather than compiled. I think it will be dangerous if someone did not know this.

This break may be occurred because golang uses the register to pass the param after go1.17, and some magic about go stack will be broken.

This PR try to abandon some one use this library after go1.17

image

xiekeyi98 commented 2 years ago

The ci has broken at the latest it expected.

huandu commented 2 years ago

Thanks for your PR.

I was trying to fix #10 but failed. I haven't found a valid solution right now. However, I still want to fix it some day. I'm reading Go runtime code more thoroughly to find other possible ways to hack it.

To make go1.17 users more clear about the status of this package, I can update README soon to highlight the issue.

xiekeyi98 commented 2 years ago

Thanks for your PR.

I was trying to fix #10 but failed. I haven't found a valid solution right now. However, I still want to fix it some day. I'm reading Go runtime code more thoroughly to find other possible ways to hack it.

To make go1.17 users more clear about the status of this package, I can update README soon to highlight the issue.

I would be amazed if this problem can be fixed.

I think it is the difficult problem, thank you for trying to fix this.