CHATLAB and Talktave

Congratulations to Luis Mendo for hitting 100k unicorn points ...
Dec 15, 2022 22:23
@CrisLuengo #OpenSourceNotAcrime
Dec 15, 2022 22:21
@flawr sorry, as I wasn’t recognizing the title, I thought this room was Ok, for general So meta questions.
Dec 15, 2022 22:18
Or when algorithms is no longer speech…
 

Trash can

Like the recycle bin, but trashier.
Dec 15, 2022 22:16
2
Q: Is Stack Exchange Ok about letting questions related to work about open source code banned in the United States?

user2284570It recently appeared that the ofac took sanctions not only about an encrypting program along its organization, but also its open source code too. While they later clarified that simply republishing the original (and no longer working) code before the sanction is Ok, working or seeking questions a...

 

C++ Questions and Answers

Solve problems and approach solutions. Just ask and lurkers wi...
May 15, 2021 23:05
@PeterT In that second case, should I rewrite the code using record or can I use record as if it was instanciaed directly?
May 15, 2021 20:30
but as the constructor of myclass requires arguments, it doesn’t work.
May 15, 2021 20:30
1
A: How do I make define and declare a variable using the default constructor in C++?

YttrillMyClass instance; is also a definition, using the default constructor. If you want to merely declare it you need extern MyClass instance; which is not a definition. Both, however, have external linkage.

May 15, 2021 20:29
I know about
May 15, 2021 20:28
-3
Q: How to just declare a variable using a class with a constructor requiring parameters?

user2284570I have the following non thread safe inside an Openmp for loop bneijt::MetalinkFile record(filename, &mirrorList); because the constructor at the same time updates mirrorList which is a vector used after the loop and thus has to be shared among all threads. Where the MetalinkFile class is class ...

May 15, 2021 20:28
Hello, just a simple question, how to declare a variable from a class with a constructor requiring arguments?
 
Dec 28, 2020 09:43
Dec 27, 2020 23:19
Since I m having lot of shared memory at fixed location, maybe I should write a C module just for that. Or is rust able to read or write to memory usint a constant direcrly instead of using a pointer to it?
Dec 27, 2020 23:16
@Shepmaster howecer, because ptr::read() takes a a pointer as parameter, a constant, is first put on the stack and the value on the stack (innorder be read as a pointer) is then put inside a register for reading even with optimizations enabled. you can have something movl $*ds:581684,r15 directly as I understand. C reimains superior for that case.
Dec 27, 2020 16:54
@Shepmaster is there a playground for viewing the compiled assembly?
Dec 27, 2020 16:34
Where buf is longer than 8 elements
Dec 27, 2020 16:20
@Shepmaster it s a call to a compiled library so it wont get inlined. it simply uses mem::transmute under the hoods. How to do solething like if 42==std::mem::transmute(buf)?
Dec 27, 2020 16:01
@Shepmaster a last unrelated thing, how I can write at a fixed compile time memory location? For example, *0xbedfade=3..
Dec 27, 2020 15:48
Because latency is an issue as this is a race against a competitor and that I want to avoid stack and register saving and out of all accessing unitizlized memory after allocation?
Dec 27, 2020 15:42
@Shepmaster sorry I was meaning without using the byteorder crate.
Dec 27, 2020 15:42
@Shepmaster and for doing it on array while still using NativeEndian?
Dec 27, 2020 15:42
@Shepmaster it s rather that I need to preserve the existing byte ordering and that the code will run on cpu supportting unaligned memory access. So how to do the same without from_be_bytes since it seems there s no from_ptr() function? It also seems Vec has no read_u32.
Dec 27, 2020 15:42
What if buf is a vec<8>?
 
Jul 21, 2019 22:01
@RbMm Ok… So even functions from symbols share that address ?
Jul 21, 2019 21:52
@RbMm What’s the supposed base address of PspSetLdtInformation ?
Jul 21, 2019 21:43
@RbMm guess the stub function being called by NtSetLdtEntries.
Jul 21, 2019 21:42
And in ɪᴅᴀ (with debug Symbol loaded) the result is the same : i.sstatic.net/AC4Qi.png
Jul 21, 2019 21:39
@RbMm I mean does your tool automatically redownload debug symbol ?
Jul 21, 2019 21:35
Are you sure you’re using the right Debug Symbol file ?
Jul 21, 2019 21:34
This what I’m getting with depends.exe from Latest Microsoft ꜱᴅᴋ i.sstatic.net/S8uIi.png
Jul 21, 2019 21:32
@RbMm I strongly believe there’s no ᴀᴘɪ.
Jul 21, 2019 21:23
@RbMm With official Microsoft depends.exe, I have base address 0x140000000. The functions you have on screen also can’t be seen through grep or findstr.
Jul 21, 2019 21:21
@RbMm Which tool name ?
Jul 21, 2019 21:20
@RbMm Which tool ?
Jul 21, 2019 21:14
@RbMm anyway here’s the files : filebin.net/bq0oh702yl6kg7et
Jul 21, 2019 21:13
@RbMm mayor promised everyone would get fiber to home before 2017 in order to overcome this situation… We’re still waiting…
Jul 21, 2019 21:10
@RbMm as stated in the previous comment at available ɪꜱᴘ speed.
Jul 21, 2019 21:09
After’s it’s currently the matter of waiting at 10Kb/s for 17Mb.
Jul 21, 2019 21:08
And KieGetldr which I brought the code before (but isn’t exported).
Jul 21, 2019 21:06
@RbMm More exactly, it’s ntkrnlmp
Jul 21, 2019 21:04
Ok there’s ZwSetLdtEntries but that’s all.
Jul 21, 2019 21:00
@RbMm maybe we can share a file ? I doubled checked and they aren’t there… included as data.
Jul 21, 2019 20:57
@RbMm Because I run latest Windows 10 Insider, and I don’t have those functions. Not even in debug symbols.
Jul 21, 2019 20:55
@RbMm do they come from the supposed cleaned ntoskrnl.exe (the one after anniversary update) ?
Jul 21, 2019 20:52
I don’t know the exact function name being called through the system call since it can’t be NtSetLdtEntries which doesn’t exists but according to Reactᴏꜱ developers it’s a stub.
Jul 21, 2019 20:51
@RbMm For All the functions above, I was talking about 64 bits kernel (and those functions in your image aren’t present in 64 bits Ntoskrnl.exe). NtSetLdtEntries being dissassmbled here is as you can guess a function of 64 bits version of NtDll.dll.
Jul 21, 2019 20:35
Ok… It calls a stub
Jul 21, 2019 20:20
Of course, I already know most of the parameters of NtSetLdtEntries .
Jul 21, 2019 20:16
@RbMm what’s the function being called here ? More Generally, what’s the calling convention on Win64 ?
Jul 21, 2019 20:15
public NtSetLdtEntries
NtSetLdtEntries proc near
mov r10, rcx ; NtSetLdtEntries
mov eax, 1A1h
syscall ; $!
retn
Jul 21, 2019 19:59
@RbMm Yes they aren't accessible through a System call or Internal Driver API. But there's still code for the LDT.