On 8/8/23 18:16, Kurtis Rader wrote:
Did you also recompile the plugin with the new Go toolchain? It's a requirement of plugin support that the main program and all plugins be compiled with the same toolchain.
Yes, the loading program and the module were both compiled with the same toolchain. After the first occurence of the issue, I removed everything below $GOPATH and cleaned the cache, just to make sure everything got recompiled correctly - but the problem persists.
If loading and loaded module differ, I would expect a panic like "plugin was built with a different version" (I remember seeing that once) - but certainly not a panic in a regular expression parser.
On Tue, Aug 8, 2023 at 11:12 AM Bernd Fix <[email protected]> wrote:After switching from go1.20.7 to go1.21.0 one of my applications compiles without warnings or errors, but fails at run-time with the following panic when loading a plugin: panic: regexp: Compile(`^([\w./]+)/((?:\w+)|[*])(.+)?$`): error parsing regexp: invalid escape sequence: `\w` goroutine 1 [running]: regexp.MustCompile({0x7fee026ddc4f, 0x1e}) .../golang/src/regexp/regexp.go:319 +0xb4 google.golang.org/grpc/internal/binarylog.init() .../ext/pkg/mod/ google.golang.org/[email protected]/internal/binarylog/env_config.go:135 +0xf9 plugin.open({0xc0000146b0, 0xe}) .../golang/src/plugin/plugin_dlopen.go:95 +0x51c plugin.Open(...) .../golang/src/plugin/plugin.go:80 The above regex compiles fine in go1.21.0 directly, so I wonder what is happening here. After switching back to 1.20.7 and a full recompilation, the application works fine again... Cheers, Bernd. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/d208fed7-dec3-8865-b332-1d693122edda%40hoi-polloi.org .
-- "Es sind nicht die besten Massen, die für Brot und Spiele den Verlust der Freiheit verschmerzen." (Kautsky, 1919, "Diktatur des Proletariats") -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/f78480c7-e68e-3996-9bc6-6b334ccb3fa9%40hoi-polloi.org.
