In the following code, the proof of the view associated with opts is stored in inp.sh. This proof needs to be taken out and put back into view@opts before the function main0 can exit.
implement main0 () = let var opts: ip6_pktopts var inp: inpcb val () = inp.in6p_outputopts := addr@opts val () = inp.sh := shared_make(view@opts | addr@opts) in ignoret(usleep(1000u)) end On Sat, Aug 29, 2020 at 4:31 AM Kiwamu Okabe <kiw...@debian.or.jp> wrote: > Dear all, > > There is a security issue on FreeBSD: > > * Security Advisory: > https://www.freebsd.org/security/advisories/FreeBSD-SA-20:20.ipv6.asc > * The patch: > https://github.com/freebsd/freebsd/commit/5707de0ed806712f53752acd433313a39f63f15c > > I'm writing following ATS code to try to avoid the issue: > > > https://github.com/metasepi/postmortem/blob/master/Security-Advisory/FreeBSD-kernel/FreeBSD-SA-20:20.ipv6/Resolution/ATS2/error/main.dats > > But the code causes following error: > > ``` > $ patscc -D_GNU_SOURCE -DATS_MEMALLOC_LIBC main.dats -lpthread > .../FreeBSD-SA-20:20.ipv6/Resolution/ATS2/error/main.dats: > 2574(line=98, offs=22) -- 2764(line=105, offs=6): > error(3): the linear dynamic variable [opts$view$5659(-1)] is > preserved but with an incompatible type. > ``` > > How to assign a `shared` value onto a member of vtype? > > Best regards, > -- > Kiwamu Okabe at METASEPI DESIGN > > -- > You received this message because you are subscribed to the Google Groups > "ats-lang-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to ats-lang-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ats-lang-users/CAEvX6d%3DDxDQ4hNty%3DXA6t12Ge2LDuMQpv7C_wRLNsXUY_-t78w%40mail.gmail.com > . > -- You received this message because you are subscribed to the Google Groups "ats-lang-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLogy7PexTYTuNpYsyzPxAP0UuGy19HHeRRw9oYOWC_CmA%40mail.gmail.com.