Can you isolate the problem?
If the issue is within the regex, you might be able to put that in a 
separate program to test if it happens there too.

Op woensdag 9 augustus 2023 om 00:51:01 UTC+2 schreef Bernd Fix:

> 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 <b...@hoi-polloi.org> 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/gr...@v1.57.0/internal/binarylog/env_config.go:135 
> <http://google.golang.org/grpc@v1.57.0/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 golang-nuts...@googlegroups.com.
> >> 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 golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/91198fba-a405-4eda-b6ed-0ab0fb1cf1a2n%40googlegroups.com.

Reply via email to